module
Matter::Crypto::AES::WordArrayHelper
Defined in:
matter/crypto/aes/word_array.crClass Method Summary
-
.bytes_to_block(bytes : Bytes, block : WordArray, byte_offset : Int32 = 0)
Copy bytes into a 4-word block.
-
.create(length : Int32) : WordArray
Create a new word array with specified length
-
.from_bytes(bytes : Bytes, alignment : Int32 = 1) : WordArray
Convert byte array to word array
-
.read_int32_be(bytes : Bytes, offset : Int32) : Int32
Read big-endian Int32 from bytes
-
.read_int32_platform(bytes : Bytes, offset : Int32) : Int32
Read platform-endian Int32 from bytes
-
.read_partial_word(bytes : Bytes, offset : Int32, bytes_available : Int32 | Nil = nil) : Int32
Read a word from a byte array that may be smaller than four bytes (big-endian)
-
.write_int32_be(bytes : Bytes, offset : Int32, value : Int32)
Write big-endian Int32 to bytes
-
.write_int32_platform(bytes : Bytes, offset : Int32, value : Int32)
Write platform-endian Int32 to bytes
-
.write_partial_word(word : Int32, bytes : Bytes, offset : Int32, bytes_available : Int32 | Nil = nil)
Write a partial word to a byte array (big-endian)
Class Method Detail
Copy bytes into a 4-word block. If input is too short, sets missing bytes to zero.
Create a new word array with specified length
Convert byte array to word array
Read platform-endian Int32 from bytes
Read a word from a byte array that may be smaller than four bytes (big-endian)
Write big-endian Int32 to bytes
Write platform-endian Int32 to bytes
Write a partial word to a byte array (big-endian)