def LcRc4.start_drop

bend-osdev-legacy-ciphers@0.1.0.0 · rc4.bend:186

import bend-osdev-legacy-ciphers@0.1.0.0/rc4.bend as Rc4
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B
import bend-osdev-legacy-ciphers@0.1.0.0/legacy_ciphers.bend as L

186# the state after dropping the first n keystream bytes (RC4-drop[n]; RFC 4345
187# drops 1536 for SSH's arcfour128 and arcfour256)
188def LcRc4.start_drop(key: B.Octets, n: Nat) -> Result<&2, &2, L.LcError, LcRc4State>:
189  Result.map(&2, &2, L.LcError, LcRc4State, LcRc4State, st => rc4.drop(n, st), LcRc4.start(key))

Uses (8)

Used by (2)