PolyvalNaive

Mojo struct 🡭

PolyvalNaive

@memory_only
struct PolyvalNaive

Portable software POLYVAL implementation.

Reference: https://github.com/RustCrypto/universal-hashes/blob/master/polyval/src/backend/soft.rs

Aliases

  • BLOCK_SIZE = BLOCK_SIZE
  • KEY_SIZE = KEY_SIZE
  • TAG_SIZE = TAG_SIZE

Implemented traits

AnyType, Copyable, Deinitable, Movable, UniversalHashable

Methods

__init__

fn def __init__(out self, var h: Array[UInt8, Int(16)])

Args:

  • h (Array[UInt8, Int(16)])
  • self (Self)

Returns:

Self

update_block

fn def update_block(mut self, var block: Array[UInt8, Int(16)])

Args:

  • self (Self)
  • block (Array[UInt8, Int(16)])

finalize

fn def finalize(deinit self) -> Array[UInt8, Int(16)]

Args:

  • self (Self)

Returns:

Array[UInt8, Int(16)]

reset

fn def reset(mut self)

Args:

  • self (Self)