class
Crypto::ChaCha20::OpenSSL
- Crypto::ChaCha20::OpenSSL
- Crypto::ChaCha20::Cipher
- Reference
- Object
Overview
OpenSSL-backed ChaCha20 backend. Wraps OpenSSL::Cipher for hardware-accelerated encryption where available.
Defined in:
crypto/chacha20/openssl.crConstant Summary
-
BLOCK_SIZE =
Crypto::ChaCha20::BLOCK_SIZE
Constructors
- .new(key : Bytes, nonce : Bytes, counter : UInt32 = 0_u32)
- .new(key : String, nonce : String, counter : UInt32 = 0_u32)
Instance Method Summary
- #clone
- #encrypt(plaintext : Bytes, encrypted : Bytes) : Nil
- #encrypt(plaintext : Bytes) : Bytes
- #next_key_block : StaticArray(UInt32, 16)
- #reset
Instance methods inherited from class Crypto::ChaCha20::Cipher
encrypt(plaintext : Bytes, encrypted : Bytes) : Nilencrypt(plaintext : Bytes) : Bytes encrypt, next_key_block : StaticArray(UInt32, 16) next_key_block, reset reset