Assets/Scripts/BIP39/Utilities.cs
/// <summary>
/// Uint32 to Byte Array in Little Endian
/// </summary>
/// <param name="val">the uint32 to convert</param>
/// <param name="@out">The byte array representation of uint32 in little endian</param>
/// <param name="offset">Offset to start placing the bytes in the byte array</param>
Uint32 to Byte Array in Little Endian
Uint32 to Byte Array in Little Endian
public static void Uint32ToByteArrayLe(uint val, byte[] @out, int offset)
        {
            @out[offset + 0] = (byte)(val >> 0);
            @out[offset + 1] = (byte)(val >> 8);
            @out[offset + 2] = (byte)(val >> 16);
            @out[offset + 3] = (byte)(val >> 24);
        }
public static void Uint32ToByteArrayLe ( uint val , byte [ ] @out , int offset ) { @out [ offset + 0 ] = ( byte ) ( val >> 0 ) ; @out [ offset + 1 ] = ( byte ) ( val >> 8 ) ; @out [ offset + 2 ] = ( byte ) ( val >> 16 ) ; @out [ offset + 3 ] = ( byte ) ( val >> 24 ) ; }
Uint32 to Byte Array in Little Endian
Uint32 to Byte Array in Little Endian
val
uint
the uint32 to convert
the uint32 to convert
@out
byte[]
The byte array representation of uint32 in little endian
The byte array representation of uint32 in little endian
offset
int
Offset to start placing the bytes in the byte array
Offset to start placing the bytes in the byte array