check.bend checks
raw source on the hub · import bend-osdev-hashes@0.1.0.0/check.bend as Check
Generated by gen/check.py; do not edit by hand.
Every hash on its specification's vectors, through the public interface: the digest in one call, then the same message fed in three pieces (init, three updates, final). Then Streebog's transformations on RFC 6986's example 1, a million bytes "a" through SHA-1 and RIPEMD-160, and Michael on the six vectors recalled as the standard's (each key the previous tag; unverified, README.md), on IEEE 802.11-2012 M.6.3's TKIP frame (as hostap's wlantest/test_vectors.c gives it), with a short key refused. The values are the specifications' (the #| lines).
10 imports
import Base import bend-osdev-bytes@0.1.0.0/bytes.bend as B import ./hashes.bend as Hs import ./md4.bend as M4 import ./md5.bend as M5 import ./sha1.bend as S1 import ./ripemd160.bend as RM import ./sm3.bend as SM import ./streebog.bend as ST import ./michael.bend as MI
Definitions
def third source · line 23 · raw
@+o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> Nat
a byte string in three pieces: [0, n/3), [n/3, 2n/3), [2n/3, n)
def p1 source · line 26 · raw
@+o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets
def p2 source · line 29 · raw
@+o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets
def p3 source · line 32 · raw
@+o:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> 0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets
def mic.of source · line 35 · raw
@r:Result<&2, &2, 0xd04c3185dce130521497bf85ab03f249/hashes.HsError, 0xd04c3185dce130521497bf85ab03f249/hashes.HsW2> -> @+m:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> String
def mic source · line 44 · raw
@k:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> @m:0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets -> String
def as.go source · line 48 · raw
@n:Nat -> @acc:List<&2, U32> -> List<&2, U32>
n bytes "a", built tail-recursively
def million_a source · line 55 · raw
0x9df7f91779a4a1c215bfa96cd0864601/bytes.Octets
def main source · line 58 · raw
IO(Unit)