def clamp_mask

bend-collections@1.0.0.0 · src/crypto/poly1305/poly1305.bend:17

import bend-collections@1.0.0.0/src/crypto/poly1305/poly1305.bend as Poly1305
import Base

17# r &= 0x0ffffffc0ffffffc0ffffffc0fffffff, byte by byte.
18def clamp_mask(i: Nat) -> U32:
19  match i:
20    case 3n: 15
21    case 7n: 15
22    case 11n: 15
23    case 15n: 15
24    case 4n: 252
25    case 8n: 252
26    case 12n: 252
27    case _: 255

Uses (2)

Used by (1)