hmac.bend checks
raw source on the hub · import element-crypto@0.1.0.0/hmac.bend as Hmac
2 imports
import Base import ./sha256.bend as Sha256
Definitions
def xor_bytes source · line 7 · raw
@xs:List<&2, U32> -> @+c:U32 -> List<&2, U32>
def zeros source · line 14 · raw
@n:Nat -> List<&2, U32>
def block_key source · line 22 · raw
@+key:List<&2, U32> -> List<&2, U32>
The key as one 64-byte block: hashed if longer, zero-padded if shorter.
def hmac source · line 26 · raw
@key:List<&2, U32> -> @msg:List<&2, U32> -> List<&2, U32>
def extract source · line 30 · raw
@salt:List<&2, U32> -> @ikm:List<&2, U32> -> List<&2, U32>
def expand_go source · line 34 · raw
@n:Nat -> @+prk:List<&2, U32> -> @+info:List<&2, U32> -> @+prev:List<&2, U32> -> @+i:U32 -> List<&2, U32>
T(i) = HMAC(PRK, T(i-1) | info | i), for i = 1..n; output is T(1) | ... | T(n).
def expand source · line 42 · raw
@+prk:List<&2, U32> -> @+info:List<&2, U32> -> @+len:U32 -> List<&2, U32>
def repeat source · line 45 · raw
@n:Nat -> @+v:U32 -> List<&2, U32>
def hex_val source · line 54 · raw
@+c:U32 -> U32
def unhex source · line 57 · raw
@s:String -> List<&2, U32>