Shortcuts for some common Ixian cryptographic operations.
More...
|
static string | hashToString (byte[] data) |
| Converts a byte-field into a hexadecimal string representation. More...
|
|
static byte [] | stringToHash (string data) |
| Converts a hexadecimal string value of any length into a byte-field representation. More...
|
|
static byte [] | sha256 (byte[] data, int offset=0, int count=0) |
| Computes a SHA256 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset and count parameters. More...
|
|
static byte [] | sha512 (byte[] data, int offset=0, int count=0) |
| Computes a SHA512 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset and count parameters. More...
|
|
static byte [] | sha512sq (byte[] data, int offset=0, int count=0) |
| Computes a (SHA512)^2 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset and count parameters. More...
|
|
static byte [] | sha512sqTrunc (byte[] data, int offset=0, int count=0, int hash_length=44) |
| Computes a trunc(N, (SHA512)^2) value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset and count parameters. More...
|
|
static byte [] | sha512qu (byte[] data, int offset=0, int count=0) |
| Computes a (SHA512)^4 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset and count parameters. More...
|
|
static byte [] | sha512quTrunc (byte[] data, int offset=0, int count=0, int hash_length=32) |
| Computes a trunc(N, (SHA512)^4) value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset and count parameters. More...
|
|
Shortcuts for some common Ixian cryptographic operations.
Definition at line 10 of file Crypto.cs.
◆ hashToString()
static string IXICore.Crypto.hashToString |
( |
byte [] |
data | ) |
|
|
static |
Converts a byte-field into a hexadecimal string representation.
- Parameters
-
- Returns
- Hexadecimal string representation of the byte field.
Definition at line 17 of file Crypto.cs.
◆ sha256()
static byte [] IXICore.Crypto.sha256 |
( |
byte [] |
data, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 |
|
) |
| |
|
static |
Computes a SHA256 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset
and count
parameters.
- Parameters
-
data | Source data for hashing. |
offset | Byte offset into the data. Default = 0 |
count | Number of bytes to use in the calculation. Default, 0, means use all available bytes. |
- Returns
- SHA256 hash of the input data.
Definition at line 55 of file Crypto.cs.
◆ sha512()
static byte [] IXICore.Crypto.sha512 |
( |
byte [] |
data, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 |
|
) |
| |
|
static |
Computes a SHA512 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset
and count
parameters.
- Parameters
-
data | Source data for hashing. |
offset | Byte offset into the data. Default = 0 |
count | Number of bytes to use in the calculation. Default, 0, means use all available bytes. |
- Returns
- SHA512 hash of the input data.
Definition at line 75 of file Crypto.cs.
◆ sha512qu()
static byte [] IXICore.Crypto.sha512qu |
( |
byte [] |
data, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 |
|
) |
| |
|
static |
Computes a (SHA512)^4 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset
and count
parameters.
The term (SHA512)^4 in this case means hashing the value four times - e.g. using SHA512 repeatedly on the computed hash value.
- Parameters
-
data | Source data for hashing. |
offset | Byte offset into the data. Default = 0 |
count | Number of bytes to use in the calculation. Default, 0, means use all available bytes. |
- Returns
- SHA256 quad hash of the input data.
Definition at line 160 of file Crypto.cs.
◆ sha512quTrunc()
static byte [] IXICore.Crypto.sha512quTrunc |
( |
byte [] |
data, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 , |
|
|
int |
hash_length = 32 |
|
) |
| |
|
static |
Computes a trunc(N, (SHA512)^4) value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset
and count
parameters.
The term (SHA512)^4 in this case means hashing the value four times - e.g. using SHA512 repeatedly on the computed hash value. The trunc(N, X) function represents taking only the first N
bytes of the byte-field X
.
- Parameters
-
data | Source data for hashing. |
offset | Byte offset into the data. Default = 0 |
count | Number of bytes to use in the calculation. Default, 0, means use all available bytes. |
hash_length | Number of bytes to keep from the truncated hash. |
- Returns
- SHA256 quad and truncated hash of the input data.
Definition at line 179 of file Crypto.cs.
◆ sha512sq()
static byte [] IXICore.Crypto.sha512sq |
( |
byte [] |
data, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 |
|
) |
| |
|
static |
Computes a (SHA512)^2 value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset
and count
parameters.
The term (SHA512)^2 in this case means hashing the value twice - e.g. using SHA512 again on the computed hash value.
- Parameters
-
data | Source data for hashing. |
offset | Byte offset into the data. Default = 0 |
count | Number of bytes to use in the calculation. Default, 0, means use all available bytes. |
- Returns
- SHA256 squared hash of the input data.
Definition at line 106 of file Crypto.cs.
◆ sha512sqTrunc()
static byte [] IXICore.Crypto.sha512sqTrunc |
( |
byte [] |
data, |
|
|
int |
offset = 0 , |
|
|
int |
count = 0 , |
|
|
int |
hash_length = 44 |
|
) |
| |
|
static |
Computes a trunc(N, (SHA512)^2) value of the given data. It is possible to calculate the hash for a subset of the input data by using the offset
and count
parameters.
The term (SHA512)^2 in this case means hashing the value twice - e.g. using SHA512 again on the computed hash value. The trunc(N, X) function represents taking only the first N
bytes of the byte-field X
.
- Parameters
-
data | Source data for hashing. |
offset | Byte offset into the data. Default = 0 |
count | Number of bytes to use in the calculation. Default, 0, means use all available bytes. |
hash_length | Number of bytes to keep from the truncated hash. |
- Returns
- SHA256 squared and truncated hash of the input data.
Definition at line 142 of file Crypto.cs.
◆ stringToHash()
static byte [] IXICore.Crypto.stringToHash |
( |
string |
data | ) |
|
|
static |
Converts a hexadecimal string value of any length into a byte-field representation.
- Parameters
-
- Returns
- Byte array with the value of the input hexadecimal string.
Definition at line 36 of file Crypto.cs.
The documentation for this class was generated from the following file: