public final class PK11Cipher extends Cipher implements java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
byte[] |
doFinal()
Deprecated.
isPadded() in EncryptionAlgorithm has been deprecated
|
byte[] |
doFinal(byte[] bytes)
Deprecated.
isPadded() in EncryptionAlgorithm has been deprecated
|
byte[] |
doFinal(byte[] bytes,
int offset,
int length)
Completes an cipher operation.
|
void |
finalize() |
void |
initDecrypt(SymmetricKey key)
Initializes a decryption context with a symmetric key.
|
void |
initDecrypt(SymmetricKey key,
java.security.spec.AlgorithmParameterSpec parameters)
Deprecated.
isPadded() in EncryptionAlgorithm has been deprecated
|
void |
initEncrypt(SymmetricKey key)
Initializes a encryption context with a symmetric key.
|
void |
initEncrypt(SymmetricKey key,
java.security.spec.AlgorithmParameterSpec parameters)
Deprecated.
isPadded() in EncryptionAlgorithm has been deprecated
|
byte[] |
update(byte[] bytes)
Updates the encryption context with additional input.
|
byte[] |
update(byte[] bytes,
int offset,
int length)
Updates the encryption context with additional plaintext.
|
public void initEncrypt(SymmetricKey key) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, TokenException
CipherinitEncrypt in class Cipherjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionTokenExceptionpublic void initDecrypt(SymmetricKey key) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, TokenException
CipherinitDecrypt in class Cipherjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionTokenException@Deprecated public void initEncrypt(SymmetricKey key, java.security.spec.AlgorithmParameterSpec parameters) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, TokenException
CipherinitEncrypt in class Cipherjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionTokenException@Deprecated public void initDecrypt(SymmetricKey key, java.security.spec.AlgorithmParameterSpec parameters) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException, TokenException
CipherinitDecrypt in class Cipherjava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionTokenExceptionpublic byte[] update(byte[] bytes)
throws java.lang.IllegalStateException,
TokenException
Cipherupdate in class Cipherbytes - Bytes of plaintext (if encrypting) or ciphertext (if
decrypting).java.lang.IllegalStateExceptionTokenExceptionpublic byte[] update(byte[] bytes,
int offset,
int length)
throws java.lang.IllegalStateException,
TokenException
Cipherupdate in class Cipherbytes - Bytes of plaintext (if encrypting) or ciphertext (if
decrypting).offset - The index in bytes at which to begin reading.length - The number of bytes from bytes to read.java.lang.IllegalStateExceptionTokenException@Deprecated
public byte[] doFinal(byte[] bytes)
throws java.lang.IllegalStateException,
IllegalBlockSizeException,
javax.crypto.BadPaddingException,
TokenException
Cipherupdate may be called
any number of times before calling final.doFinal in class Cipherbytes - Bytes of plaintext (if encrypting) or ciphertext (if
decrypting).java.lang.IllegalStateExceptionIllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionTokenExceptionpublic byte[] doFinal(byte[] bytes,
int offset,
int length)
throws java.lang.IllegalStateException,
IllegalBlockSizeException,
javax.crypto.BadPaddingException,
TokenException
CipherdoFinal in class Cipherbytes - Bytes of plaintext (if encrypting) or ciphertext (if
decrypting).offset - The index in bytes at which to begin reading.length - The number of bytes from bytes to read.java.lang.IllegalStateExceptionIllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionTokenException@Deprecated
public byte[] doFinal()
throws java.lang.IllegalStateException,
IllegalBlockSizeException,
javax.crypto.BadPaddingException,
TokenException
CipherdoFinal in class Cipherjava.lang.IllegalStateExceptionIllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionTokenExceptionpublic void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exception