def hs.stb.rounds
import bend-osdev-hashes@0.1.0.0/streebog.bend as Streebogimport Base
import bend-osdev-hashes@0.1.0.0/hashes.bend as Hs
766# E's rounds: x the data so far, k the round key; then the last key added
767def hs.stb.rounds(cs: List<&2, Hs.HsW16>, +t: HsStbTabs, +k: Hs.HsW16, x: Hs.HsW16) -> Hs.HsW16:
768 match cs:
769 case Nil{}:
770 hs.stb.xor(x, k)
771 case Con{c, rest}:
772 hs.stb.rounds(rest, t, hs.stb.lps(t, hs.stb.xor(k, c)), hs.stb.lps(t, hs.stb.xor(x, k)))