~/bend-docscommunity

sha1.bend checks

raw source on the hub · import element-crypto@0.1.0.0/sha1.bend as Sha1

2 imports
import Base
import ./sha256.bend as Sha256

Types

type H5 source · line 8 · raw

Data

Definitions

def rotl source · line 11 · raw

@+x:U32 -> @+n:U32 -> U32

def f_of source · line 14 · raw

@+t:U32 -> @+b:U32 -> @+c:U32 -> @+d:U32 -> U32

def k_of source · line 19 · raw

@+t:U32 -> U32

def round source · line 22 · raw

@+st:H5 -> @+t:U32 -> @+w:U32 -> H5

def rounds source · line 27 · raw

@ws:List<&2, U32> -> @+t:U32 -> @+st:H5 -> H5

def drop1 source · line 34 · raw

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

def sched source · line 42 · raw

@n:Nat -> @+win:List<&2, U32> -> @+out:List<&2, U32> -> List<&2, U32>

80 words from a 16-word window: w[t] = rotl1(w[t-3] ^ w[t-8] ^ w[t-14] ^ w[t-16]).

def add5 source · line 50 · raw

@x:H5 -> @y:H5 -> H5

def compress source · line 55 · raw

@+st:H5 -> @+block:List<&2, U32> -> H5

def blocks source · line 59 · raw

@n:Nat -> @+bs:List<&2, U32> -> @st:H5 -> H5

def h5_bytes source · line 66 · raw

@st:H5 -> List<&2, U32>

def digest source · line 71 · raw

@+bs:List<&2, U32> -> List<&2, U32>