class Crypto::Blake2b

Defined in:

crypto/hash/blake2b.cr

Constant Summary

BLOCK_SIZE = 128
IV = Slice[7640891576956012808_u64, 13503953896175478587_u64, 4354685564936845355_u64, 11912009170470909681_u64, 5840696475078001361_u64, 11170449401992604703_u64, 2270897969802886507_u64, 6620516959819538809_u64]
MAGIC = "b2b"
MARSHALED_SIZE = ((((MAGIC.size + (8 * 8)) + (2 * 8)) + 1) + BLOCK_SIZE) + 1
SIGMA = Slice[Slice[0_u8, 2_u8, 4_u8, 6_u8, 1_u8, 3_u8, 5_u8, 7_u8, 8_u8, 10_u8, 12_u8, 14_u8, 9_u8, 11_u8, 13_u8, 15_u8], Slice[14_u8, 4_u8, 9_u8, 13_u8, 10_u8, 8_u8, 15_u8, 6_u8, 1_u8, 0_u8, 11_u8, 5_u8, 12_u8, 2_u8, 7_u8, 3_u8], Slice[11_u8, 12_u8, 5_u8, 15_u8, 8_u8, 0_u8, 2_u8, 13_u8, 10_u8, 3_u8, 7_u8, 9_u8, 14_u8, 6_u8, 1_u8, 4_u8], Slice[7_u8, 3_u8, 13_u8, 11_u8, 9_u8, 1_u8, 12_u8, 14_u8, 2_u8, 5_u8, 4_u8, 15_u8, 6_u8, 10_u8, 0_u8, 8_u8], Slice[9_u8, 5_u8, 2_u8, 10_u8, 0_u8, 7_u8, 4_u8, 15_u8, 14_u8, 11_u8, 6_u8, 3_u8, 1_u8, 12_u8, 8_u8, 13_u8], Slice[2_u8, 6_u8, 0_u8, 8_u8, 12_u8, 10_u8, 11_u8, 3_u8, 4_u8, 7_u8, 15_u8, 1_u8, 13_u8, 5_u8, 14_u8, 9_u8], Slice[12_u8, 1_u8, 14_u8, 4_u8, 5_u8, 15_u8, 13_u8, 10_u8, 0_u8, 6_u8, 9_u8, 8_u8, 7_u8, 3_u8, 2_u8, 11_u8], Slice[13_u8, 7_u8, 12_u8, 3_u8, 11_u8, 14_u8, 1_u8, 9_u8, 5_u8, 15_u8, 8_u8, 2_u8, 0_u8, 4_u8, 6_u8, 10_u8], Slice[6_u8, 14_u8, 11_u8, 0_u8, 15_u8, 9_u8, 3_u8, 8_u8, 12_u8, 13_u8, 1_u8, 10_u8, 2_u8, 7_u8, 4_u8, 5_u8], Slice[10_u8, 8_u8, 7_u8, 1_u8, 2_u8, 4_u8, 6_u8, 5_u8, 15_u8, 9_u8, 3_u8, 13_u8, 11_u8, 14_u8, 12_u8, 0_u8], Slice[0_u8, 2_u8, 4_u8, 6_u8, 1_u8, 3_u8, 5_u8, 7_u8, 8_u8, 10_u8, 12_u8, 14_u8, 9_u8, 11_u8, 13_u8, 15_u8], Slice[14_u8, 4_u8, 9_u8, 13_u8, 10_u8, 8_u8, 15_u8, 6_u8, 1_u8, 0_u8, 11_u8, 5_u8, 12_u8, 2_u8, 7_u8, 3_u8]]
SIZE = 64
SIZE256 = 32
SIZE384 = 48

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(hash_size : Int32, key : Bytes | Nil = nil) #

[View source]

Class Method Detail

def self.new256(key = nil) #

[View source]
def self.new384(key = nil) #

[View source]
def self.new512(key = nil) #

[View source]
def self.sum256(data) #

[View source]
def self.sum384(data) #

[View source]
def self.sum512(data) #

[View source]

Instance Method Detail

def reset #

[View source]
def sum(sum = nil) #

[View source]
def write(p) #

[View source]