Assets/Scripts/BIP39/Utilities.cs
/// <summary>
/// Bytes to Uint32 in BigEndian format
/// </summary>
/// <param name="bytes">Bytes to get Uint32 from</param>
/// <param name="offset">Offset to start getting the UInt32 from</param>
/// <returns>Uint32</returns>
Bytes to Uint32 in BigEndian format
Bytes to Uint32 in BigEndian format
public static uint ReadUint32Be(byte[] bytes, int offset)
        {
            return (((uint)bytes[offset + 0]) << 24) |
                   (((uint)bytes[offset + 1]) << 16) |
                   (((uint)bytes[offset + 2]) << 8) |
                   (((uint)bytes[offset + 3]) << 0);
        }
public static uint ReadUint32Be ( byte [ ] bytes , int offset ) { return ( ( ( uint ) bytes [ offset + 0 ] ) << 24 ) | ( ( ( uint ) bytes [ offset + 1 ] ) << 16 ) | ( ( ( uint ) bytes [ offset + 2 ] ) << 8 ) | ( ( ( uint ) bytes [ offset + 3 ] ) << 0 ) ; }
Bytes to Uint32 in BigEndian format
Bytes to Uint32 in BigEndian format
None
bytes
byte[]
Bytes to get Uint32 from
Bytes to get Uint32 from
offset
int
Offset to start getting the UInt32 from
Offset to start getting the UInt32 from