module Crypto

Defined in:

monocypher.cr
monocypher/hashes.cr

Constant Summary

MUCH_MB = 50
OVERHEAD_SYMMETRIC = Header.size + Nonce.size

Class Method Summary

Class Method Detail

def self.blake2b(data : Bytes, *, hash_size : Int32 = 64, key : Bytes | Nil = nil) : Bytes #

[View source]
def self.decrypt(*, output : Bytes, additional : Bytes | Nil = nil, key : SymmetricKey, input : Bytes) : Bool #

[View source]
def self.encrypt(*, output : Bytes, key : SymmetricKey, input : Bytes, additional : Bytes | Nil = nil) : Nil #

adds nonce and mac to the packet


[View source]
def self.sha512(data : Bytes) : Bytes #

[View source]