public interface LengthPreservingEncryption extends Closeable
| Modifier and Type | Method and Description |
|---|---|
InputStream |
createDecryptionStream(InputStream stream,
byte[] initializationVector) |
OutputStream |
createEncryptionStream(OutputStream stream,
byte[] initializationVector) |
byte[] |
decrypt(byte[] data,
byte[] initializationVector) |
byte[] |
encrypt(byte[] data,
byte[] initializationVector) |
@CheckReturnValue @Nonnull byte[] encrypt(byte[] data, byte[] initializationVector) throws GeneralSecurityException, com.pkware.archive.ArchiveException, MetaClientException
initializationVector - must be 16 bytesGeneralSecurityException - For various reasons, including:
com.pkware.archive.ArchiveException - if not licensed for this operation. See PKSession.allowSymmetricEncryption().MetaClientException - if this key is not allowed to be used for encryption. See Smartkey.canEncrypt().@Nonnull byte[] decrypt(byte[] data, byte[] initializationVector) throws GeneralSecurityException, com.pkware.archive.ArchiveException, MetaClientException
initializationVector - must be 16 bytesGeneralSecurityException - For various reasons, including:
com.pkware.archive.ArchiveException - if not licensed for this operation. See PKSession.allowSymmetricEncryption().MetaClientException - if this key is not allowed to be used for decryption. See Smartkey.canDecrypt().@CheckReturnValue @Nonnull OutputStream createEncryptionStream(OutputStream stream, byte[] initializationVector) throws GeneralSecurityException, com.pkware.archive.ArchiveException, MetaClientException
initializationVector - must be 16 bytesGeneralSecurityException - For various reasons, including:
com.pkware.archive.ArchiveException - if not licensed for this operation. See PKSession.allowSymmetricEncryption().MetaClientException - if this key is not allowed to be used for encryption. See Smartkey.canEncrypt().@Nonnull InputStream createDecryptionStream(InputStream stream, byte[] initializationVector) throws GeneralSecurityException, com.pkware.archive.ArchiveException, MetaClientException
initializationVector - must be 16 bytesGeneralSecurityException - For various reasons, including:
com.pkware.archive.ArchiveException - if not licensed for this operation. See PKSession.allowSymmetricEncryption().MetaClientException - if this key is not allowed to be used for decryption. See Smartkey.canDecrypt().