|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jcetaglib.lib.Asymmetric
Asymmetric encryption & decryption routines with BouncyCastle JCE provider
Constructor Summary | |
Asymmetric()
|
Method Summary | |
static void |
decrypt(java.io.InputStream is,
java.io.DataOutputStream daos,
java.security.PrivateKey decryptKey,
int bufferlength)
Decrypts an inputstream, encrypted with an RSA public key (from X.509), with the corresponding private key |
static java.lang.StringBuffer |
decrypt(java.lang.StringBuffer text,
java.security.PrivateKey decryptKey)
decrypts text with a private RSA key (from a X.509 certificate) |
static void |
encrypt(java.io.InputStream is,
java.io.DataOutputStream daos,
java.security.PublicKey encryptKey,
int bufferlength)
Encrypts an inputstream with a public RSA key (from a X.509 certificate) This result can only be decrypted with the corresponding private key |
static java.lang.StringBuffer |
encrypt(java.lang.StringBuffer text,
java.security.PublicKey encryptKey)
Encrypts text with a public RSA key (from a X.509 certificate) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Asymmetric()
Method Detail |
public static java.lang.StringBuffer encrypt(java.lang.StringBuffer text, java.security.PublicKey encryptKey) throws CryptoException
text
- the text to encryptencryptKey
- the public encryption key
CryptoException
- for encryption errorspublic static void encrypt(java.io.InputStream is, java.io.DataOutputStream daos, java.security.PublicKey encryptKey, int bufferlength) throws CryptoException, java.io.IOException
is
- the inputstream to encryptdaos
- returns ciphered outputstreamencryptKey
- the public encryption key
java.io.IOException
- I/O errors
CryptoException
- for all encryption errorspublic static java.lang.StringBuffer decrypt(java.lang.StringBuffer text, java.security.PrivateKey decryptKey) throws CryptoException
text
- the text to decryptdecryptKey
- the private key
CryptoException
- for encryption errorspublic static void decrypt(java.io.InputStream is, java.io.DataOutputStream daos, java.security.PrivateKey decryptKey, int bufferlength) throws CryptoException, java.io.IOException
is
- the inputstream to decryptdaos
- returns deciphered outputstreamdecryptKey
- the private key
java.io.IOException
- I/O errors
CryptoException
- for all encryption errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |