@InterfaceAudience.Private @InterfaceStability.Evolving public class CommonsCryptoAES extends Cipher
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CIPHER_CLASSES_KEY |
static String |
CIPHER_JCE_PROVIDER_KEY |
static String |
CIPHER_MODE_KEY |
BLOCK_SIZE, IV_LENGTH, KEY_LENGTH, KEY_LENGTH_BITS, RNG_ALGORITHM_KEY, RNG_PROVIDER_KEY| 构造器和说明 |
|---|
CommonsCryptoAES(CipherProvider provider) |
| 限定符和类型 | 方法和说明 |
|---|---|
InputStream |
createDecryptionStream(InputStream in,
Context context,
byte[] iv)
Create a decrypting input stream given a context and IV
|
InputStream |
createDecryptionStream(InputStream in,
Decryptor decryptor)
Create a decrypting output stream given an initialized decryptor
|
OutputStream |
createEncryptionStream(OutputStream out,
Context context,
byte[] iv)
Create an encrypting output stream given a context and IV
|
OutputStream |
createEncryptionStream(OutputStream out,
Encryptor encryptor)
Create an encrypting output stream given an initialized encryptor
|
Decryptor |
getDecryptor()
Return a decryptor for decrypting data.
|
Encryptor |
getEncryptor()
Get an encryptor for encrypting data.
|
int |
getIvLength()
Return the expected initialization vector length, in bytes, or 0 if not applicable
|
int |
getKeyLength()
Return the key length required by this cipher, in bytes
|
String |
getName()
Return this Cipher's name
|
Key |
getRandomKey()
Create a random symmetric key
|
getProviderpublic CommonsCryptoAES(CipherProvider provider)
public int getKeyLength()
CiphergetKeyLength 在类中 Cipherpublic int getIvLength()
CiphergetIvLength 在类中 Cipherpublic Key getRandomKey()
CiphergetRandomKey 在类中 Cipherpublic Encryptor getEncryptor()
CiphergetEncryptor 在类中 Cipherpublic Decryptor getDecryptor()
CiphergetDecryptor 在类中 Cipherpublic OutputStream createEncryptionStream(OutputStream out, Context context, byte[] iv) throws IOException
CiphercreateEncryptionStream 在类中 Cipherout - the output stream to wrapcontext - the encryption contextiv - initialization vectorIOExceptionpublic OutputStream createEncryptionStream(OutputStream out, Encryptor encryptor) throws IOException
CiphercreateEncryptionStream 在类中 Cipherout - the output stream to wrapencryptor - the encryptorIOExceptionpublic InputStream createDecryptionStream(InputStream in, Context context, byte[] iv) throws IOException
CiphercreateDecryptionStream 在类中 Cipherin - the input stream to wrapcontext - the encryption contextiv - initialization vectorIOExceptionpublic InputStream createDecryptionStream(InputStream in, Decryptor decryptor) throws IOException
CiphercreateDecryptionStream 在类中 Cipherin - the input stream to wrapdecryptor - the decryptorIOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.