![]() |
BogaNet 1.4.0
|
Helper for HMAC cryptography. It contains ready-to-use implementations of HMAC-SHA256, HMAC-SHA384, HMAC-SHA512, HMAC-SHA3-256, HMAC-SHA3-384 and HMAC-SHA3-512. More...
Static Public Member Functions | |
| static byte[] | GenerateSecret (int length=16) |
| Generates a secure secret for HMAC. | |
| static byte[] | Hash (byte[] bytes, HMAC algo) |
| Generates a HMAC-value as byte-array with given byte-array and algorithm as input. | |
| static byte[] | Hash (string? text, HMAC algo, Encoding? encoding=null) |
| Generates a HMAC-value as byte-array with a given string and algorithm as input. | |
| static byte[] | HashFile (string file, HMAC algo) |
| Generates a HMAC-value as byte-array from a file. | |
| static async Task< byte[]> | HashFileAsync (string file, HMAC algo) |
| Generates a HMAC-value as byte-array from a file asynchronously. | |
| static byte[] | HashHMACSHA256 (byte[] bytes, byte[] secret) |
| Generates a HMAC-value with SHA256 as byte-array with a given byte-array and secret as input. | |
| static byte[] | HashHMACSHA256 (string text, byte[] secret, Encoding? encoding=null) |
| Generates a HMAC-value with SHA256 as byte-array with a given string and secret as input. | |
| static byte[] | HashHMACSHA256File (string file, byte[] secret) |
| Generates a HMAC-value with SHA256 as byte-array from a file. | |
| static async Task< byte[]> | HashHMACSHA256FileAsync (string file, byte[] secret) |
| Generates a HMAC-value with SHA256 as byte-array from a file asynchronously. | |
| static byte[] | HashHMACSHA384 (byte[] bytes, byte[] secret) |
| Generates a HMAC-value with SHA384 as byte-array with a given byte-array and secret as input. | |
| static byte[] | HashHMACSHA384 (string text, byte[] secret, Encoding? encoding=null) |
| Generates a HMAC-value with SHA384 as byte-array with a given string and secret as input. | |
| static byte[] | HashHMACSHA384File (string file, byte[] secret) |
| Generates a HMAC-value with SHA384 as byte-array from a file. | |
| static async Task< byte[]> | HashHMACSHA384FileAsync (string file, byte[] secret) |
| Generates a HMAC-value with SHA384 as byte-array from a file asynchronously. | |
| static byte[] | HashHMACSHA512 (byte[] bytes, byte[] secret) |
| Generates a HMAC-value with SHA512 as byte-array with a given byte-array and secret as input. | |
| static byte[] | HashHMACSHA512 (string text, byte[] secret, Encoding? encoding=null) |
| Generates a HMAC-value with SHA512 as byte-array with a given string and secret as input. | |
| static byte[] | HashHMACSHA512File (string file, byte[] secret) |
| Generates a HMAC-value with SHA512 as byte-array from a file. | |
| static async Task< byte[]> | HashHMACSHA512FileAsync (string file, byte[] secret) |
| Generates a HMAC-value with SHA512 as byte-array from a file asynchronously. | |
| static byte[] | HashHMACSHA3_256 (byte[] bytes, byte[] secret) |
| Generates a HMAC-value with SHA3-256 as byte-array with a given byte-array and secret as input. | |
| static byte[] | HashHMACSHA3_256 (string text, byte[] secret, Encoding? encoding=null) |
| Generates a HMAC-value with SHA3-256 as byte-array with a given string and secret as input. | |
| static byte[] | HashHMACSHA3_256File (string file, byte[] secret) |
| Generates a HMAC-value with SHA3-256 as byte-array from a file. | |
| static async Task< byte[]> | HashHMACSHA3_256FileAsync (string file, byte[] secret) |
| Generates a HMAC-value with SHA3-256 as byte-array from a file asynchronously. | |
| static byte[] | HashHMACSHA3_384 (byte[] bytes, byte[] secret) |
| Generates a HMAC-value with SHA3-384 as byte-array with a given byte-array and secret as input. | |
| static byte[] | HashHMACSHA3_384 (string text, byte[] secret, Encoding? encoding=null) |
| Generates a HMAC-value with SHA3-384 as byte-array with a given string and secret as input. | |
| static byte[] | HashHMACSHA3_384File (string file, byte[] secret) |
| Generates a HMAC-value with SHA3-384 as byte-array from a file. | |
| static async Task< byte[]> | HashHMACSHA3_384FileAsync (string file, byte[] secret) |
| Generates a HMAC-value with SHA3-384 as byte-array from a file asynchronously. | |
| static byte[] | HashHMACSHA3_512 (byte[] bytes, byte[] secret) |
| Generates a HMAC-value with SHA3-512 as byte-array with a given byte-array and secret as input. | |
| static byte[] | HashHMACSHA3_512 (string text, byte[] secret, Encoding? encoding=null) |
| Generates a HMAC-value with SHA3-512 as byte-array with a given string and secret as input. | |
| static byte[] | HashHMACSHA3_512File (string file, byte[] secret) |
| Generates a HMAC-value with SHA3-512 as byte-array from a file. | |
| static async Task< byte[]> | HashHMACSHA3_512FileAsync (string file, byte[] secret) |
| Generates a HMAC-value with SHA3-512 as byte-array from a file asynchronously. | |
Helper for HMAC cryptography. It contains ready-to-use implementations of HMAC-SHA256, HMAC-SHA384, HMAC-SHA512, HMAC-SHA3-256, HMAC-SHA3-384 and HMAC-SHA3-512.
|
static |
Generates a secure secret for HMAC.
| length | Length of the secret (optional, default: 16) |
|
static |
Generates a HMAC-value as byte-array with given byte-array and algorithm as input.
| bytes | Data as byte-array |
| algo | HMAC-algorithm |
| Exception |
|
static |
Generates a HMAC-value as byte-array with a given string and algorithm as input.
| text | Data as string |
| algo | HMAC-algorithm |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value as byte-array from a file.
| file | File to hash |
| algo | Hash-algorithm |
| Exception |
|
static |
Generates a HMAC-value as byte-array from a file asynchronously.
| file | File to hash |
| algo | Hash-algorithm |
| Exception |
|
static |
Generates a HMAC-value with SHA256 as byte-array with a given byte-array and secret as input.
| bytes | Data as byte-array |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA256 as byte-array with a given string and secret as input.
| text | Data as string |
| secret | Shared secret for HMAC |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value with SHA256 as byte-array from a file.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA256 as byte-array from a file asynchronously.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA384 as byte-array with a given byte-array and secret as input.
| bytes | Data as byte-array |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA384 as byte-array with a given string and secret as input.
| text | Data as string |
| secret | Shared secret for HMAC |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value with SHA384 as byte-array from a file.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA384 as byte-array from a file asynchronously.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-256 as byte-array with a given byte-array and secret as input.
| bytes | Data as byte-array |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-256 as byte-array with a given string and secret as input.
| text | Data as string |
| secret | Shared secret for HMAC |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value with SHA3-256 as byte-array from a file.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-256 as byte-array from a file asynchronously.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-384 as byte-array with a given byte-array and secret as input.
| bytes | Data as byte-array |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-384 as byte-array with a given string and secret as input.
| text | Data as string |
| secret | Shared secret for HMAC |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value with SHA3-384 as byte-array from a file.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-384 as byte-array from a file asynchronously.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-512 as byte-array with a given byte-array and secret as input.
| bytes | Data as byte-array |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-512 as byte-array with a given string and secret as input.
| text | Data as string |
| secret | Shared secret for HMAC |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value with SHA3-512 as byte-array from a file.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA3-512 as byte-array from a file asynchronously.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA512 as byte-array with a given byte-array and secret as input.
| bytes | Data as byte-array |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA512 as byte-array with a given string and secret as input.
| text | Data as string |
| secret | Shared secret for HMAC |
| encoding | Encoding of the string (optional, default: UTF8) |
| Exception |
|
static |
Generates a HMAC-value with SHA512 as byte-array from a file.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |
|
static |
Generates a HMAC-value with SHA512 as byte-array from a file asynchronously.
| file | File to hash |
| secret | Shared secret for HMAC |
| Exception |