public class RsaClientCipher extends java.lang.Object implements EncryptionCipher
| Constructor and Description |
|---|
RsaClientCipher(byte[] encodedPublicKey)
Creates a new cipher client using the specified RSA public key.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encrypt(byte[] data)
Encrypts the specified data.
|
void |
init()
Initializes the cipher instance.
|
public RsaClientCipher(byte[] encodedPublicKey)
encodedPublicKey - a RSA public key.public void init()
throws java.lang.Exception
init in interface EncryptionCipherjava.lang.Exceptionpublic byte[] encrypt(byte[] data)
throws java.security.GeneralSecurityException
encrypt in interface EncryptionCipherdata - the data to encrypt.java.security.GeneralSecurityException