Hello.
I am trying to generate a signature to the XML document according to GOST 34.10-2001, i use JCP cryptopro.
Canonicalizer canon = Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); InputStream is2 = new ByteArrayInputStream(canon.canonicalize(outputStream2.toByteArray())); byte[] bb = canon.canonicalize(outputStream2.toByteArray()); svt.setValue(sign("CryptoProSignature", key, bb));
I initialize the storage as follows:
KeyStore ks = KeyStore.getInstance("FloppyStore"); ks.load(null, null); PrivateKey key = (PrivateKey)ks.getKey("maiss", passwd.toCharArray());
So, the signature value is obtained each time different with the same input data. What could be the problem?
Thank you in advance.