~/bend-docscommunity

sha2_64.bend checks

raw source on the hub · import 0xfcfaebefd5553d7c2403dcd5c4130b80/sha2_64.bend as Sha2_64

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

Types

type S512 source · line 4 · raw

Data

Definitions

def SHA2_64.ch source · line 7 · raw

@+x:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @+y:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @+z:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.maj source · line 10 · raw

@+x:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @+y:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @+z:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.big0 source · line 13 · raw

@+x:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.big1 source · line 16 · raw

@+x:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.small0 source · line 19 · raw

@+x:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.small1 source · line 22 · raw

@+x:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.ks source · line 25 · raw

List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def SHA2_64.schedule.next source · line 28 · raw

@+ring:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64

def SHA2_64.schedule.go source · line 35 · raw

@+initial:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @n:Nat -> @+ring:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @acc:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64>

def SHA2_64.schedule source · line 44 · raw

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

def SHA2_64.step source · line 47 · raw

@st:S512 -> @w:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> @k:0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64 -> S512

def SHA2_64.rounds source · line 54 · raw

@ws:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @ks:List<&2, 0xfcfaebefd5553d7c2403dcd5c4130b80/internal/core.W64> -> @st:S512 -> S512

def SHA2_64.add source · line 63 · raw

@+x:S512 -> @y:S512 -> S512

def SHA2_64.compress source · line 68 · raw

@+st:S512 -> @+bytes:List<&2, U32> -> S512

def SHA2_64.length_tail source · line 75 · raw

@+length:Nat -> List<&2, U32>

SHA-384/SHA-512 use a 128-bit encoded bit length. Bend 2.0.10's native runtime limits Nat to 2^48-1, so every representable byte length has a bit length below 2^51 and the upper 64 bits are necessarily zero.

def SHA2_64.pad.go source · line 79 · raw

@+rest:List<&2, U32> -> @+rem:U32 -> @tail:List<&2, U32> -> @short:Bool -> List<&2, U32>

def SHA2_64.pad source · line 88 · raw

@+rest:List<&2, U32> -> @+length:Nat -> @short:Bool -> List<&2, U32>

def SHA2_64.final.blocks source · line 91 · raw

@+st:S512 -> @+padded:List<&2, U32> -> @one:Bool -> S512

def SHA2_64.final source · line 99 · raw

@+rest:List<&2, U32> -> @+length:Nat -> @st:S512 -> S512

def SHA2_64.blocks source · line 104 · raw

@n:Nat -> @+xs:List<&2, U32> -> @+total:Nat -> @st:S512 -> S512

def SHA512.iv source · line 112 · raw

S512

def SHA384.iv source · line 115 · raw

S512

def SHA512.digest source · line 118 · raw

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

def SHA384.digest source · line 124 · raw

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

def SHA512.bytes source · line 129 · raw

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

def SHA384.bytes source · line 133 · raw

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

def SHA512.hex_bytes source · line 137 · raw

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

def SHA384.hex_bytes source · line 140 · raw

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

def SHA512.text source · line 143 · raw

@s:String -> String

def SHA384.text source · line 146 · raw

@s:String -> String

def SHA512_224.iv source · line 153 · raw

S512

FIPS 180-4 initial values for the truncated SHA-512 variants.

def SHA512_256.iv source · line 161 · raw

S512

def SHA512_224.digest source · line 170 · raw

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

SHA-512/224 is the leftmost 224 bits: A || B || C || high32(D).

def SHA512_256.digest source · line 178 · raw

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

SHA-512/256 is the leftmost 256 bits: A || B || C || D.

def SHA512_224.bytes source · line 183 · raw

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

def SHA512_256.bytes source · line 187 · raw

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

def SHA512_224.hex_bytes source · line 191 · raw

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

def SHA512_256.hex_bytes source · line 194 · raw

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

def SHA512_224.text source · line 197 · raw

@s:String -> String

def SHA512_256.text source · line 200 · raw

@s:String -> String