m****r 发帖数: 6639 | 1 i get the binary bytes from somewhere, that is the key i am suppose to use
when i sign my document.
the api for javax.xml.crypto.dom.DOMCryptoContext wants a java.security.Key
object, not byte[]. but just looking at the api's, it's not clear to me how
i can go from one thing to the other. anyone can help?
thanks | g*****g 发帖数: 34805 | 2 http://java.sun.com/docs/books/tutorial/security/apisign/vstep2.html
private key is similar. However, private key is supposed to be kept
in keystore though.
Key
how
【在 m****r 的大作中提到】 : i get the binary bytes from somewhere, that is the key i am suppose to use : when i sign my document. : the api for javax.xml.crypto.dom.DOMCryptoContext wants a java.security.Key : object, not byte[]. but just looking at the api's, it's not clear to me how : i can go from one thing to the other. anyone can help? : thanks
| m******t 发帖数: 2416 | 3
You need to ask that "somewhere" how to convert these bytes into a key. They
can be anything for all we know - exported ascii, raw bytes of a keystore
file, a serialized Key object, etc.
【在 m****r 的大作中提到】 : i get the binary bytes from somewhere, that is the key i am suppose to use : when i sign my document. : the api for javax.xml.crypto.dom.DOMCryptoContext wants a java.security.Key : object, not byte[]. but just looking at the api's, it's not clear to me how : i can go from one thing to the other. anyone can help? : thanks
| m****r 发帖数: 6639 | 4 后来好像是这样解决的. 我自己implement一个MyKey class, 然后, 写 getEncoded().
They
【在 m******t 的大作中提到】 : : You need to ask that "somewhere" how to convert these bytes into a key. They : can be anything for all we know - exported ascii, raw bytes of a keystore : file, a serialized Key object, etc.
|
|