abstract class Sodium::Cipher::Chalsa

Overview

The great beat you can eat!

What? They're both dance?

Direct Known Subclasses

Defined in:

sodium/cipher/chalsa.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(key = nil, nonce = nil) #

[View source]

Instance Method Detail

def dup #
Description copied from class Reference

Returns a shallow copy of this object.

This allocates a new object and copies the contents of self into it.


[View source]
def edible? #

Always returns false. Sadness...


[View source]
def final #

Provided for compatibility with block or tagged ciphers. Stream ciphers don't have additional data.


[View source]
def key #

[View source]
def key=(key : Bytes | SecureBuffer) #

[View source]
def key? : Slice(UInt8) | Sodium::SecureBuffer | Nil #

[View source]
abstract def key_size : Int32 #

[View source]
def nonce #

[View source]
def nonce=(nonce : Bytes) #

[View source]
def nonce? : Slice(UInt8)? #

[View source]
abstract def nonce_size : Int32 #

[View source]
def offset : Int32 #

Advanced usage. Don't touch.


[View source]
def offset=(offset) #

Advanced usage. Don't touch.


[View source]
def random_bytes(bytes : Bytes) : Bytes #

Use as a CSPRNG.


[View source]
def random_bytes(size : Int) : Bytes #

Use as a CSPRNG.


[View source]
def random_key #

[View source]
def random_nonce #

[View source]
def update(src : Bytes) : Bytes #

Xor's src with the cipher output and returns a new Slice


[View source]
abstract def update(src : Bytes, dst : Bytes) #

[View source]