Salmon
Loading...
Searching...
No Matches
Mku.Salmon.Generator Class Reference

Utility class generates internal secure properties. More...

Static Public Member Functions

static byte[] GetMagicBytes ()
 Gets the fixed magic bytes array.
 
static byte[] GetSecureRandomBytes (int size)
 Returns a secure random byte array. To be used when generating keys, initial vectors, and nonces.
 

Static Public Attributes

static readonly byte VERSION = 2
 Version.
 
static readonly int MAGIC_LENGTH = 3
 Lenght for the magic bytes.
 
static readonly int VERSION_LENGTH = 1
 Length for the Version in the data header.
 
static readonly int BLOCK_SIZE = 16
 Should be 16 for AES256 the same as the iv.
 
static readonly int KEY_LENGTH = 32
 Encryption key length for AES256.
 
static readonly int HASH_KEY_LENGTH = 32
 HASH Key length for integrity, currently we use HMAC SHA256.
 
static readonly int HASH_RESULT_LENGTH = 32
 Hash signature size for integrity, currently we use HMAC SHA256.
 
static readonly int NONCE_LENGTH = 8
 Nonce size.
 
static readonly int CHUNK_SIZE_LENGTH = 4
 Chunk size format length.
 

Detailed Description

Utility class generates internal secure properties.

Member Function Documentation

◆ GetSecureRandomBytes()

static byte[] Mku.Salmon.Generator.GetSecureRandomBytes ( int size)
static

Returns a secure random byte array. To be used when generating keys, initial vectors, and nonces.

Parameters
sizeThe size of the byte array.
Returns
The random secure byte array.

The documentation for this class was generated from the following file: