on 11-13-2008 8:38 AM
Hi All,
By calling the Java method in the UDF I am able to generate the XML signature inside a field along with the public key.
Now I need to Verify the signature.
Can somebody help me out on how to read the Public Key from the whole XML and Verify the Signature.
Thanks,
Rupash K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Read Public Keys from XML :
http://www.theserverside.com/discussions/thread.tss?thread_id=51679
try {
String privKeybuffer = data.getChildTextTrim("RSASK");
privKeybuffer = privKeybuffer.replaceAll("---BEGIN RSA PRIVATE KEY---", "");
privKeybuffer = privKeybuffer.replaceAll("---END RSA PRIVATE KEY---", "");
privKeybuffer = privKeybuffer.trim();
byte[] priv_llave = new BASE64Decoder().decodeBuffer( privKeybuffer );
PKCS8EncodedKeySpec privSpec = new PKCS8EncodedKeySpec(priv_llave);
PrivateKey prvkey = (PrivateKey) kFactory.generatePrivate(privSpec);
setLlavePrivada( priv_llave );
setPrivateKey( prvkey );
} catch (Exception e) {
System.out.println("Private Key Exception:");
e.printStackTrace();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ganga Prasad,
The Link you have provided is not opening.
Also I am not using Encryption functionality.
Could you please explain your code a bit.
I am not using certifcate from Keystore instead I have the Public key in the file.
I just need to Verify the Signature generated in the mapping.
Thanks,
RK
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.