class Crypto::Blake2s

Defined in:

crypto/hash/blake2s.cr

Constant Summary

BLOCK_BYTES = 64
BUF_BYTES = 64 * 2
IV = StaticArray[1779033703_u32, 3144134277_u32, 1013904242_u32, 2773480762_u32, 1359893119_u32, 2600822924_u32, 528734635_u32, 1541459225_u32]
KEY_BYTES = 32
OUT_BYTES = 32
SIGMA = StaticArray[StaticArray[0_u8, 1_u8, 2_u8, 3_u8, 4_u8, 5_u8, 6_u8, 7_u8, 8_u8, 9_u8, 10_u8, 11_u8, 12_u8, 13_u8, 14_u8, 15_u8], StaticArray[14_u8, 10_u8, 4_u8, 8_u8, 9_u8, 15_u8, 13_u8, 6_u8, 1_u8, 12_u8, 0_u8, 2_u8, 11_u8, 7_u8, 5_u8, 3_u8], StaticArray[11_u8, 8_u8, 12_u8, 0_u8, 5_u8, 2_u8, 15_u8, 13_u8, 10_u8, 14_u8, 3_u8, 6_u8, 7_u8, 1_u8, 9_u8, 4_u8], StaticArray[7_u8, 9_u8, 3_u8, 1_u8, 13_u8, 12_u8, 11_u8, 14_u8, 2_u8, 6_u8, 5_u8, 10_u8, 4_u8, 0_u8, 15_u8, 8_u8], StaticArray[9_u8, 0_u8, 5_u8, 7_u8, 2_u8, 4_u8, 10_u8, 15_u8, 14_u8, 1_u8, 11_u8, 12_u8, 6_u8, 8_u8, 3_u8, 13_u8], StaticArray[2_u8, 12_u8, 6_u8, 10_u8, 0_u8, 11_u8, 8_u8, 3_u8, 4_u8, 13_u8, 7_u8, 5_u8, 15_u8, 14_u8, 1_u8, 9_u8], StaticArray[12_u8, 5_u8, 1_u8, 15_u8, 14_u8, 13_u8, 4_u8, 10_u8, 0_u8, 7_u8, 6_u8, 3_u8, 9_u8, 2_u8, 8_u8, 11_u8], StaticArray[13_u8, 11_u8, 7_u8, 14_u8, 12_u8, 1_u8, 3_u8, 9_u8, 5_u8, 0_u8, 15_u8, 4_u8, 8_u8, 6_u8, 2_u8, 10_u8], StaticArray[6_u8, 15_u8, 14_u8, 9_u8, 11_u8, 3_u8, 0_u8, 8_u8, 12_u8, 2_u8, 13_u8, 7_u8, 1_u8, 4_u8, 10_u8, 5_u8], StaticArray[10_u8, 2_u8, 8_u8, 4_u8, 7_u8, 6_u8, 1_u8, 5_u8, 15_u8, 11_u8, 9_u8, 14_u8, 3_u8, 12_u8, 13_u8, 0_u8]]

Constructors

Class Method Summary

Instance Method Summary

Macro Summary

Constructor Detail

def self.new(size : Int32, key = nil) #

[View source]

Class Method Detail

def self.checksum(size, data, key = nil, output = nil) #

[View source]

Instance Method Detail

def compress #

[View source]
def digest(output : Bytes | Nil = nil) #

[View source]
def increment_counter(inc) #

[View source]
def update(m) #

[View source]

Macro Detail

macro g(r, i, a, b, c, d) #

[View source]