AesAarch64

Mojo struct 🡭

AesAarch64

@memory_only
struct AesAarch64[KEY_SIZE: Int]

Aliases

  • BLOCK_SIZE = BLOCK_SIZE
  • NK = (KEY_SIZE // Int(4))
  • NR = ((KEY_SIZE // Int(4)) + Int(6))

Parameters

  • KEY_SIZE (Int)

Fields

  • enc_rks (Array[SIMD[.uint8, 16], (Int((add (KEY_SIZE // Int(4)), 6)) + Int(1))])
  • dec_rks (Array[SIMD[.uint8, 16], (Int((add (KEY_SIZE // Int(4)), 6)) + Int(1))])

Implemented traits

AnyType, BlockCipherDecryptable, BlockCipherEncryptable, Copyable, Deinitable, Movable

Methods

__init__

fn def __init__(out self, key: Array[UInt8, KEY_SIZE])

Args:

  • key (Array[UInt8, KEY_SIZE])
  • self (Self)

Returns:

Self

encrypt

fn def encrypt[o: MutOrigin](self, data: Span[UInt8, o])

Parameters:

  • o (MutOrigin)

Args:

  • self (Self)
  • data (Span[UInt8, o])

Raises:

decrypt

fn def decrypt[o: MutOrigin](self, data: Span[UInt8, o])

Parameters:

  • o (MutOrigin)

Args:

  • self (Self)
  • data (Span[UInt8, o])

Raises: