AesNaive
Mojo struct 🡭
AesNaive
@memory_only
struct AesNaive[KEY_SIZE: Int]Aliases
BLOCK_SIZE = BLOCK_SIZENK = (KEY_SIZE // Int(4))NR = ((KEY_SIZE // Int(4)) + Int(6))WORDS_SIZE = (Int(4) * Int((add (KEY_SIZE // Int(4)), 7)))
Parameters
- KEY_SIZE (
Int)
Fields
- w (
Array[UInt32, Int((add (mul (KEY_SIZE // Int(4)), 4), 28))])
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: