~/bend-docscommunity

spec/sponge.bend checks

raw source on the hub · import 0x48cee57f42dae6ba4c727fbf982cdd4d/spec/sponge.bend as Sponge

3 imports
import Base
import ../src/types.bend as T
import ./permutation.bend as F

Definitions

def initial source · line 5 · raw

0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State

def low_tail source · line 8 · raw

@w:U32 -> @n:Nat -> U32

def select_tail source · line 16 · raw

@c:Cmp -> @w:U32 -> @n:Nat -> U32

def tail_word source · line 22 · raw

@w:U32 -> @+pos:Nat -> @+remain:Nat -> U32

def last_bit source · line 25 · raw

@w:U32 -> @last:Bool -> U32

def pad source · line 30 · raw

@ws:List<&2, U32> -> @+pos:Nat -> @+remain:Nat -> List<&2, U32>

def prepare source · line 36 · raw

@padding:Bool -> @ws:List<&2, U32> -> @remain:Nat -> List<&2, U32>

def inject source · line 41 · raw

@s:0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State -> @ws:List<&2, U32> -> 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State

def gather source · line 47 · raw

@+round_count:Nat -> @n:Nat -> @+base:U32 -> @+next:U32 -> @+padding:Bool -> @+remain:Nat -> @s:0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State -> @acc:List<&2, U32> -> @pair:Pair(Array<U32>, U32) -> Pair(Array<U32>, 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State)

def absorb source · line 54 · raw

@+round_count:Nat -> @a:Array<U32> -> @+index:U32 -> @s:0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State -> Pair(Array<U32>, 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State)

def finish source · line 57 · raw

@round_count:Nat -> @a:Array<U32> -> @+index:U32 -> @remain:Nat -> @s:0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State -> 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State

def blocks source · line 60 · raw

@+round_count:Nat -> @n:Nat -> @+index:U32 -> @remain:Nat -> @pair:Pair(Array<U32>, 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State) -> 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State

def unchecked source · line 65 · raw

@+round_count:Nat -> @a:Array<U32> -> @+length:Nat -> 0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State

def digest source · line 68 · raw

@s:0x48cee57f42dae6ba4c727fbf982cdd4d/src/types.State -> Array<U32>

def checked source · line 73 · raw

@round_count:Nat -> @valid:Bool -> @a:Array<U32> -> @length:Nat -> Maybe<&1, Array<U32>>

def sized source · line 78 · raw

@round_count:Nat -> @+length:Nat -> @pair:Pair(Array<U32>, U32) -> Maybe<&1, Array<U32>>

def keccak256_rounds source · line 82 · raw

@round_count:Nat -> @a:Array<U32> -> @length:Nat -> Maybe<&1, Array<U32>>