Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 20th November 2011
Darkc0der Darkc0der is offline
Ceriwiser
 
Join Date: Nov 2011
Posts: 598
Rep Power: 14
Darkc0der mempunyai hidup yang Normal
Default [ask] java bouncycastle library





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





Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 01:46 AM.


no new posts