def bf.set_p

bend-osdev-legacy-ciphers@0.1.0.0 · blowfish.bend:260

import bend-osdev-legacy-ciphers@0.1.0.0/blowfish.bend as Blowfish
import Base

260# P entries i and i + 1 replaced by h and l
261def bf.set_p(i: Nat, ps: List<&2, U32>, +h: U32, +l: U32) -> List<&2, U32>:
262  match i:
263    case 0n:
264      match ps:
265        case Con{p, Con{q, u}}:
266          Con{h, Con{l, u}}
267        case _:
268          Nil{}
269    case 1n+j:
270      match ps:
271        case Con{p, t}:
272          Con{p, bf.set_p(j, t, h, l)}
273        case Nil{}:
274          Nil{}

Uses (3)

Used by (1)