hi!
i got a problem with the signature...
first a signature is created with php (OpenSSL)
then it�s send to a java application...
i got the problem that i can�t decrypt the encrypted signature right
(but i know that iam using the right key)...
here is the php code:
$fp = fopen("sec\\key.pem", "r");
$priv_key = fread($fp, 8192);
fclose($fp);
$pkeyid = openssl_get_privatekey($priv_key, "test");
$msg = "2005-06-10T11:43:14.0Z181010";
openssl_sign($msg , $signature, $pkeyid);
and now the java code:
Security.addProvider(new BouncyCastleProvider());
Cipher encrypt = Cipher.getInstance("RSA/NONE/PKCS1PADDING", "BC");
encrypt.init(Cipher.DECRYPT_MODE, cert);
encrypt.update(signature);
byte[] signdecr = encrypt.doFinal();
iam getting 35 byte instead of 20 (SHA1 hashing)
i hope someone can tell me what iam doing wrong
iam thankfull for everyone that wants to help
have a nice day
Extol