class Crypto::ChaCha20::OpenSSL

Overview

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

Defined in:

crypto/chacha20/openssl.cr

Constant Summary

BLOCK_SIZE = Crypto::ChaCha20::BLOCK_SIZE

Constructors

Instance Method Summary

Instance methods inherited from class Crypto::ChaCha20::Cipher

encrypt(plaintext : Bytes, encrypted : Bytes) : Nil
encrypt(plaintext : Bytes) : Bytes
encrypt
, next_key_block : StaticArray(UInt32, 16) next_key_block, reset reset

Constructor Detail

def self.new(key : Bytes, nonce : Bytes, counter : UInt32 = 0_u32) #

[View source]
def self.new(key : String, nonce : String, counter : UInt32 = 0_u32) #

[View source]

Instance Method Detail

def clone #

[View source]
def encrypt(plaintext : Bytes, encrypted : Bytes) : Nil #

[View source]
def encrypt(plaintext : Bytes) : Bytes #

[View source]
def next_key_block : StaticArray(UInt32, 16) #

[View source]
def reset #

[View source]