ChaCha20

ChaCha20 is a stream cipher developed by Daniel J. Bernstein, based on the Salsa20 cipher. It was designed to increase diffusion and performance on various architectures. It is widely used for its efficiency, security, and lack of patent restrictions.

Properties

Link copied to clipboard
open override val ivLength: UInt

The IV length depends on cryptographic primitive used by implementation.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val uuid: UUID

Each cipher used for database encryption has unique ID.

Functions

Link copied to clipboard
open override fun decrypt(key: ByteArray, iv: ByteArray, data: ByteArray): ByteArray

Decrypt the data using provided key and iv.

Link copied to clipboard
open override fun encrypt(key: ByteArray, iv: ByteArray, data: ByteArray): ByteArray

Encrypt the data using provided key and iv.