def counter

bend-collections@1.0.0.0 · src/crypto/aes/gcm.bend:126

import bend-collections@1.0.0.0/src/crypto/aes/gcm.bend as Gcm
import Base
import bend-collections@1.0.0.0/src/crypto/aes/types.bend as T

126# The counter block: the 96-bit nonce (three words) and a 32-bit counter.
127def counter(+n0: T.Quad, +n1: T.Quad, +n2: T.Quad, +c: U32) -> T.State:
128  T.S{n0, n1, n2, T.W{U32.and(255, U32.shrn(c, 24n)), U32.and(255, U32.shrn(c, 16n)), U32.and(255, U32.shrn(c, 8n)), U32.and(255, c)}}

Uses (5)

Used by (1)