Decryptor

Decrypts ciphertext data to plaintext.

Provides suspend, blocking, and streaming variants.

For the encryption counterpart, see Encryptor.

Inheritors

Functions

Link copied to clipboard
open suspend fun decrypt(ciphertext: ByteArray): ByteArray

Decrypts the given ciphertext and returns the resulting plaintext as a ByteArray.

open suspend fun decrypt(ciphertext: ByteString): ByteString

Decrypts the given ciphertext and returns the resulting plaintext as a ByteString.

Link copied to clipboard
abstract fun decryptBlocking(ciphertext: ByteArray): ByteArray

Decrypts the given ciphertext and returns the resulting plaintext as a ByteArray.

open fun decryptBlocking(ciphertext: ByteString): ByteString

Decrypts the given ciphertext and returns the resulting plaintext as a ByteString.

Link copied to clipboard
abstract fun decryptingSink(plaintext: RawSink): RawSink

Returns a RawSink that decrypts data as it is written, sending the resulting plaintext to plaintext. Write ciphertext to the returned sink, and plaintext will be forwarded to plaintext.

Link copied to clipboard
abstract fun decryptingSource(ciphertext: RawSource): RawSource

Returns a RawSource that decrypts data as it is read from the given ciphertext source. The resulting source produces plaintext on reads.