LengthError

LengthError

Mojo struct 🡭

LengthError

@memory_only
struct LengthError

Raised when GCM-SIV input exceeds the maximum permitted length.

Fields

  • aad_len (Int)
  • data_len (Int)

Implemented traits

AnyType, Deinitable, Movable, Writable

Methods

check_encrypt

@staticmethod
fn def check_encrypt(aad_len: Int, data_len: Int)

Enforce the RFC 8452 § 6 caps on AAD and plaintext lengths.

Args:

  • aad_len (Int)
  • data_len (Int)

Raises:

check_decrypt

@staticmethod
fn def check_decrypt(aad_len: Int, data_len: Int)

Enforce the RFC 8452 § 6 caps on AAD and ciphertext lengths.

Args:

  • aad_len (Int)
  • data_len (Int)

Raises:

write_to

fn def write_to(self, mut writer: T)

Args:

  • self (Self)
  • writer (T)