class

Crypto::ChaCha20::OpenSSL

Inherits Crypto::ChaCha20::Cipher < Reference < Object

OpenSSL-backed ChaCha20 backend. Wraps OpenSSL::Cipher for hardware-accelerated encryption where available.

Constants

BLOCK_SIZE = Crypto::ChaCha20::BLOCK_SIZE

Constructors

new(key : Bytes, nonce : Bytes, counter : UInt32 = 0_u32)
Source
new(key : String, nonce : String, counter : UInt32 = 0_u32)
Source

Instance methods

clone
Source
encrypt(plaintext : Bytes, encrypted : Bytes) : Nil
Source
encrypt(plaintext : Bytes) : Bytes
Source
next_key_block
Source
reset
Source