~/bend-docscommunity

blake3.bend checks

raw source on the hub · import 0xfcfaebefd5553d7c2403dcd5c4130b80/blake3.bend as Blake3

2 imports
import Base
import ./internal/core.bend as C

Types

type B3Output source · line 9 · raw

Data

Definitions

def B3.iv source · line 12 · raw

List<&2, U32>

def B3.sigmas source · line 15 · raw

List<&2, List<&2, U32>>

def B3.msg source · line 18 · raw

@+m:List<&2, U32> -> @+sig:List<&2, U32> -> @pos:Nat -> U32

def B3.g source · line 21 · raw

@+v:List<&2, U32> -> @+a:Nat -> @+b:Nat -> @+c:Nat -> @+d:Nat -> @x:U32 -> @y:U32 -> List<&2, U32>

def B3.round source · line 39 · raw

@+v:List<&2, U32> -> @+m:List<&2, U32> -> @+s:List<&2, U32> -> List<&2, U32>

def B3.rounds source · line 49 · raw

@ss:List<&2, List<&2, U32>> -> @+m:List<&2, U32> -> @v:List<&2, U32> -> List<&2, U32>

def B3.finish source · line 56 · raw

@+cv:List<&2, U32> -> @+v:List<&2, U32> -> List<&2, U32>

def B3.compress.counter source · line 76 · raw

@+cv:List<&2, U32> -> @+block:List<&2, U32> -> @counter_hi:U32 -> @counter_lo:U32 -> @block_len:U32 -> @flags:U32 -> List<&2, U32>

def B3.compress source · line 85 · raw

@+cv:List<&2, U32> -> @+block:List<&2, U32> -> @counter:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @block_len:U32 -> @flags:U32 -> List<&2, U32>

def B3.cv source · line 90 · raw

@words:List<&2, U32> -> List<&2, U32>

def B3.output_cv source · line 93 · raw

@out:B3Output -> List<&2, U32>

def B3.start_flag source · line 98 · raw

@zero:Bool -> U32

def B3.nonfinal source · line 105 · raw

@+cv:List<&2, U32> -> @+block:List<&2, U32> -> @counter:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @done:U32 -> List<&2, U32>

def B3.final_flags source · line 109 · raw

@zero:Bool -> U32

def B3.pad source · line 116 · raw

@+rest:List<&2, U32> -> @+n:U32 -> List<&2, U32>

def B3.chunk_blocks source · line 127 · raw

@n:Nat -> @+xs:List<&2, U32> -> @+total:U32 -> @+done:U32 -> @cv:List<&2, U32> -> @+counter:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> B3Output

def B3.chunk_output.if source · line 137 · raw

@+xs:List<&2, U32> -> @+length:U32 -> @counter:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @empty:Bool -> B3Output

def B3.chunk_output source · line 145 · raw

@+xs:List<&2, U32> -> @+length:U32 -> @+counter:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> B3Output

def B3.parent_output source · line 148 · raw

@left:List<&2, U32> -> @right:List<&2, U32> -> B3Output

def B3.parent_cv source · line 151 · raw

@left:List<&2, U32> -> @right:List<&2, U32> -> List<&2, U32>

def B3.chunk_cvs.go source · line 158 · raw

@n:Nat -> @+xs:List<&2, U32> -> @+index:Nat -> @acc:List<&2, List<&2, U32>> -> List<&2, List<&2, U32>>

Build chunk CVs into a reversed accumulator. The old direct cv <> B3.chunk_cvs(...) form retained one JavaScript call frame per 1024-byte chunk and could exhaust the Node stack on multi-megabyte inputs. This version is tail-recursive.

def B3.chunk_cvs source · line 170 · raw

@n:Nat -> @+xs:List<&2, U32> -> @+index:Nat -> List<&2, List<&2, U32>>

def B3.reduce_level source · line 173 · raw

@cvs:List<&2, List<&2, U32>> -> @acc:List<&2, List<&2, U32>> -> List<&2, List<&2, U32>>

def B3.reduce source · line 185 · raw

@fuel:Nat -> @cvs:List<&2, List<&2, U32>> -> B3Output

def B3.chunk_count.if source · line 198 · raw

@n:Nat -> @zero:Bool -> Nat

def B3.chunk_count source · line 205 · raw

@+n:Nat -> Nat

def B3.root.multi source · line 208 · raw

@+xs:List<&2, U32> -> @+chunks:Nat -> B3Output

def B3.root.if source · line 212 · raw

@+xs:List<&2, U32> -> @+n:Nat -> @+chunks:Nat -> @one:Bool -> B3Output

def B3.root source · line 219 · raw

@+xs:List<&2, U32> -> B3Output

def B3.words_le source · line 224 · raw

@words:List<&2, U32> -> List<&2, U32>

def B3.root_bytes source · line 231 · raw

@out:B3Output -> List<&2, U32>

def BLAKE3.bytes source · line 237 · raw

@xs:List<&2, U32> -> List<&2, U32>

def BLAKE3.hex_bytes source · line 240 · raw

@xs:List<&2, U32> -> String

def BLAKE3.text source · line 243 · raw

@s:String -> String