IvAuthenticatedEncryptor
Encrypts plaintext with an explicit initialization vector (IV) and optional associated data. The WithIv methods return ciphertext || tag without the IV. All WithIv methods are marked DelicateCryptographyApi because using a custom IV requires careful handling to avoid security issues such as IV reuse. When associated data is provided, it is authenticated but not encrypted. When associated data is null, only the plaintext is authenticated and encrypted.
For the decryption counterpart, see IvAuthenticatedDecryptor.
Inheritors
Functions
Encrypts the given plaintext with optional associatedData and returns the resulting ciphertext as a ByteArray.
Encrypts the given plaintext with optional associatedData and returns the resulting ciphertext as a ByteString.
Encrypts the given plaintext and returns the resulting ciphertext as a ByteString.
Encrypts the given plaintext with optional associatedData and returns the resulting ciphertext as a ByteArray.
Encrypts the given plaintext with optional associatedData and returns the resulting ciphertext as a ByteString.
Encrypts the given plaintext and returns the resulting ciphertext as a ByteString.
Returns a RawSink that encrypts data as it is written, sending the resulting ciphertext to ciphertext, with optional associatedData.
Returns a RawSink that encrypts data as it is written, sending the resulting ciphertext to ciphertext. Write plaintext to the returned sink, and ciphertext will be forwarded to ciphertext.
Returns a RawSink that encrypts data as it is written, sending the resulting ciphertext to ciphertext, using the specified iv without associated data.
Returns a RawSink that encrypts data as it is written, sending the resulting ciphertext to ciphertext, using the specified iv with optional associatedData.
Returns a RawSink that encrypts data as it is written, sending the resulting ciphertext to ciphertext, using the specified iv.
Returns a RawSource that encrypts data as it is read from the given plaintext source with optional associatedData.
Returns a RawSource that encrypts data as it is read from the given plaintext source using the specified iv without associated data.
Returns a RawSource that encrypts data as it is read from the given plaintext source using the specified iv with optional associatedData.
Encrypts the given plaintext using the specified iv without associated data and returns the resulting ciphertext as a ByteArray.
Encrypts the given plaintext using the specified iv without associated data and returns the resulting ciphertext as a ByteString.
Encrypts the given plaintext using the specified iv with optional associatedData and returns the resulting ciphertext as a ByteArray.
Encrypts the given plaintext using the specified iv with optional associatedData and returns the resulting ciphertext as a ByteString.
Encrypts the given plaintext using the specified iv without associated data and returns the resulting ciphertext as a ByteArray.
Encrypts the given plaintext using the specified iv without associated data and returns the resulting ciphertext as a ByteString.
Encrypts the given plaintext using the specified iv with optional associatedData and returns the resulting ciphertext as a ByteArray.
Encrypts the given plaintext using the specified iv with optional associatedData and returns the resulting ciphertext as a ByteString.