def ghash_field_bytes
qasim-bend-kit@0.1.0.2 · libs/AES256GCMCore.bend:336
import qasim-bend-kit@0.1.0.2/libs/AES256GCMCore.bend as AES256GCMCore
import Base
336def ghash_field_bytes(value: GhashField) -> List<&2, U32>:
337 match value:
338 case GhashField{+w0, +w1, +w2, +w3}:
339 [U32.and(255, U32.shrn(w0, 24n)), U32.and(255, U32.shrn(w0, 16n)),
340 U32.and(255, U32.shrn(w0, 8n)), U32.and(255, w0),
341 U32.and(255, U32.shrn(w1, 24n)), U32.and(255, U32.shrn(w1, 16n)),
342 U32.and(255, U32.shrn(w1, 8n)), U32.and(255, w1),
343 U32.and(255, U32.shrn(w2, 24n)), U32.and(255, U32.shrn(w2, 16n)),
344 U32.and(255, U32.shrn(w2, 8n)), U32.and(255, w2),
345 U32.and(255, U32.shrn(w3, 24n)), U32.and(255, U32.shrn(w3, 16n)),
346 U32.and(255, U32.shrn(w3, 8n)), U32.and(255, w3)]