~/bend-docscommunity

src/crypto/argon2/memory.bend checks

raw source on the hub · import 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/argon2/memory.bend as Memory

3 imports
import Base
import ./types.bend as A
import ./sub.bend as SB

Definitions

def rd source · line 12 · raw

@n:Nat -> @+i:Nat -> @acc:List<&2, U32> -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, List<&2, U32>)

Words i - n .. i, prepended to acc: pair holds the memory and word i.

def read_fin source · line 20 · raw

@pair:Pair(Array<U32>, List<&2, U32>) -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/argon2/types.Block)

def get source · line 25 · raw

@+b:Nat -> @a:Array<U32> -> Pair(Array<U32>, 0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/argon2/types.Block)

Block b; the memory is handed back.

def wr source · line 30 · raw

@ws:List<&2, U32> -> @+i:Nat -> @a:Array<U32> -> Array<U32>

The words stored from word i on.

def set source · line 38 · raw

@+b:Nat -> @v:0xd9a2fae439ac7ff9e21e0853948f94fe/src/crypto/argon2/types.Block -> @a:Array<U32> -> Array<U32>

The memory with block b replaced by v.

def pw source · line 41 · raw

@k:Nat -> Nat

def levels_go source · line 49 · raw

@fuel:Nat -> @+n:Nat -> @+k:Nat -> @done:Bool -> Nat

The smallest k >= k0 with 2^k >= n.

def levels source · line 58 · raw

@+n:Nat -> Nat

def new source · line 62 · raw

@+k:Nat -> Array<U32>

A zeroed memory of 2^k blocks.