FAQ |
Calendar |
![]() |
|
Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman. |
![]() |
|
Thread Tools |
#1
|
|||
|
|||
![]() ![]() gan, mohon pencerahan ceritanya lagi verifikasi tanda tangan digital antara client dan server gan pas lagi runnig, ada error gan.. kata errornya begini gan : org.bouncycastle.crypto.InvalidCipherTextException : unknown block type at org.bouncycastle.crypto.encodings.PKCS1Encoding.de codeBlock(Unknown Source) at org.bouncycastle.crypto.encodings.PKCS1Encoding.pr ocessBlock(Unknown Source) at SecureGprs.RSADecrypt(SecureGprs.java:267) nah kalau source yg bikin error begini gan : public byte [] RSADecrypt (byte [] toDecrypt,RSAPrivateCrtKeyParameters _RSAPrivateKey) throws Exception { if (_RSAPrivateKey == null) { throw new Exception("Please generate RSA keys first in order to work"); } AsymmetricBlockCipher theEngine = new RSAEngine(); theEngine = new PKCS1Encoding(theEngine); theEngine.init(false, _RSAPrivateKey); System.out.println("Decrypting length:"+toDecrypt.length); // nich kalimat dibawah ini yang bikin error gan return theEngine.processBlock(toDecrypt, 0, toDecrypt.length); } terima kasih agan-agan semua ![]() Terkait:
|
![]() |
|
|