public class AESCipher extends Object
| Constructor and Description |
|---|
AESCipher() |
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
decodeSecretKey(String encodedForm)
Decode the given secret key
|
InputStream |
decrypt(SecretKey secKey,
byte[] addData,
InputStream secretStream) |
InputStream |
decrypt(SecretKey secKey,
InputStream secretStream) |
String |
encodeSecretKey(SecretKey secKey)
Encode the given secret key
|
InputStream |
encrypt(SecretKey secKey,
byte[] addData,
InputStream ins) |
InputStream |
encrypt(SecretKey secKey,
InputStream ins) |
SecretKey |
getSecretKey()
Generate the secret key from a random source.
|
public SecretKey getSecretKey()
public InputStream encrypt(SecretKey secKey, InputStream ins) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic InputStream encrypt(SecretKey secKey, byte[] addData, InputStream ins) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic InputStream decrypt(SecretKey secKey, InputStream secretStream) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionpublic InputStream decrypt(SecretKey secKey, byte[] addData, InputStream secretStream) throws IOException, GeneralSecurityException
IOExceptionGeneralSecurityExceptionCopyright © 2018. All rights reserved.