module Matter::Crypto::AES::WordArrayHelper

Defined in:

matter/crypto/aes/word_array.cr

Class Method Summary

Class Method Detail

def self.bytes_to_block(bytes : Bytes, block : WordArray, byte_offset : Int32 = 0) #

Copy bytes into a 4-word block. If input is too short, sets missing bytes to zero.


[View source]
def self.create(length : Int32) : WordArray #

Create a new word array with specified length


[View source]
def self.from_bytes(bytes : Bytes, alignment : Int32 = 1) : WordArray #

Convert byte array to word array


[View source]
def self.read_int32_be(bytes : Bytes, offset : Int32) : Int32 #

Read big-endian Int32 from bytes


[View source]
def self.read_int32_platform(bytes : Bytes, offset : Int32) : Int32 #

Read platform-endian Int32 from bytes


[View source]
def self.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)


[View source]
def self.write_int32_be(bytes : Bytes, offset : Int32, value : Int32) #

Write big-endian Int32 to bytes


[View source]
def self.write_int32_platform(bytes : Bytes, offset : Int32, value : Int32) #

Write platform-endian Int32 to bytes


[View source]
def self.write_partial_word(word : Int32, bytes : Bytes, offset : Int32, bytes_available : Int32 | Nil = nil) #

Write a partial word to a byte array (big-endian)


[View source]