BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BogaNet.Helper.HashHelper Class Referenceabstract

Helper for hash computations. It contains ready-to-use implementations of SHA256, SHA384, SHA512, SHA3-256, SHA3-384 and SHA3-512. More...

Static Public Member Functions

static byte[] Hash (byte[] bytes, HashAlgorithm algo)
 Generates a hash-value as byte-array from a given byte-array and algorithm as input.
 
static byte[] Hash (string text, HashAlgorithm algo, Encoding? encoding=null)
 Generates a hash-value as byte-array from a given string and algorithm as input.
 
static byte[] HashFile (string file, HashAlgorithm algo)
 Generates a hash-value as byte-array from a file.
 
static async Task< byte[]> HashFileAsync (string file, HashAlgorithm algo)
 Generates a hash-value as byte-array from a file asynchronously.
 
static byte[] HashSHA256 (params byte[] bytes)
 Generates a SHA256-value as byte-array from a byte-array.
 
static byte[] HashSHA256 (string text, Encoding? encoding=null)
 Generates a SHA256-value as byte-array from a string.
 
static byte[] HashSHA256File (string file)
 Generates a SHA256-value as byte-array from a file.
 
static async Task< byte[]> HashSHA256FileAsync (string file)
 Generates a SHA256-value as byte-array from a file asynchronously.
 
static byte[] HashSHA384 (params byte[] bytes)
 Generates a SHA384-value as byte-array from a given byte-array.
 
static byte[] HashSHA384 (string text, Encoding? encoding=null)
 Generates a SHA384-value as byte-array from a given string.
 
static byte[] HashSHA384File (string file)
 Generates a SHA384-value as byte-array from a file.
 
static async Task< byte[]> HashSHA384FileAsync (string file)
 Generates a SHA384-value as byte-array from a file asynchronously.
 
static byte[] HashSHA512 (params byte[] bytes)
 Generates a SHA512-value as byte-array from a given byte-array.
 
static byte[] HashSHA512 (string text, Encoding? encoding=null)
 Generates a SHA512-value as byte-array from a given string.
 
static byte[] HashSHA512File (string file)
 Generates a SHA512-value as byte-array from a file.
 
static async Task< byte[]> HashSHA512FileAsync (string file)
 Generates a SHA512-value as byte-array from a file asynchronously.
 
static byte[] HashSHA3_256 (params byte[] bytes)
 Generates a SHA3-256-value as byte-array from a byte-array.
 
static byte[] HashSHA3_256 (string text, Encoding? encoding=null)
 Generates a SHA3-256-value as byte-array from a string.
 
static byte[] HashSHA3_256File (string file)
 Generates a SHA3-256-value as byte-array from a file.
 
static async Task< byte[]> HashSHA3_256FileAsync (string file)
 Generates a SHA3-256-value as byte-array from a file asynchronously.
 
static byte[] HashSHA3_384 (params byte[] bytes)
 Generates a SHA3-384-value as byte-array from a given byte-array.
 
static byte[] HashSHA3_384 (string text, Encoding? encoding=null)
 Generates a SHA3-384-value as byte-array from a given string.
 
static byte[] HashSHA3_384File (string file)
 Generates a SHA3-384-value as byte-array from a file.
 
static async Task< byte[]> HashSHA3_384FileAsync (string file)
 Generates a SHA3-384-value as byte-array from a file asynchronously.
 
static byte[] HashSHA3_512 (params byte[] bytes)
 Generates a SHA3-512-value as byte-array from a given byte-array.
 
static byte[] HashSHA3_512 (string text, Encoding? encoding=null)
 Generates a SHA3-512-value as byte-array from a given string.
 
static byte[] HashSHA3_512File (string file)
 Generates a SHA3-512-value as byte-array from a file.
 
static async Task< byte[]> HashSHA3_512FileAsync (string file)
 Generates a SHA3-512-value as byte-array from a file asynchronously.
 

Detailed Description

Helper for hash computations. It contains ready-to-use implementations of SHA256, SHA384, SHA512, SHA3-256, SHA3-384 and SHA3-512.

Member Function Documentation

◆ Hash() [1/2]

static byte[] BogaNet.Helper.HashHelper.Hash ( byte[] bytes,
HashAlgorithm algo )
static

Generates a hash-value as byte-array from a given byte-array and algorithm as input.

Parameters
bytesData as byte-array
algoHash-algorithm
Returns
Hash-value as byte-array
Exceptions
Exception

◆ Hash() [2/2]

static byte[] BogaNet.Helper.HashHelper.Hash ( string text,
HashAlgorithm algo,
Encoding? encoding = null )
static

Generates a hash-value as byte-array from a given string and algorithm as input.

Parameters
textData as string
algoHash-algorithm
encodingEncoding of the string (optional, default: UTF8)
Returns
Hash-value as byte-array
Exceptions
Exception

◆ HashFile()

static byte[] BogaNet.Helper.HashHelper.HashFile ( string file,
HashAlgorithm algo )
static

Generates a hash-value as byte-array from a file.

Parameters
fileFile to hash
algoHash-algorithm
Returns
Hash-value as byte-array
Exceptions
Exception

◆ HashFileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashFileAsync ( string file,
HashAlgorithm algo )
static

Generates a hash-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
algoHash-algorithm
Returns
Hash-value as byte-array
Exceptions
Exception

◆ HashSHA256() [1/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA256 ( params byte[] bytes)
static

Generates a SHA256-value as byte-array from a byte-array.

Parameters
bytesData as byte-array
Returns
SHA256-value as byte-array
Exceptions
Exception

◆ HashSHA256() [2/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA256 ( string text,
Encoding? encoding = null )
static

Generates a SHA256-value as byte-array from a string.

Parameters
textData as string
encodingEncoding of the string (optional, default: UTF8)
Returns
SHA256-value as byte-array
Exceptions
Exception

◆ HashSHA256File()

static byte[] BogaNet.Helper.HashHelper.HashSHA256File ( string file)
static

Generates a SHA256-value as byte-array from a file.

Parameters
fileFile to hash
Returns
SHA256-value as byte-array
Exceptions
Exception

◆ HashSHA256FileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashSHA256FileAsync ( string file)
static

Generates a SHA256-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
Returns
SHA256-value as byte-array
Exceptions
Exception

◆ HashSHA384() [1/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA384 ( params byte[] bytes)
static

Generates a SHA384-value as byte-array from a given byte-array.

Parameters
bytesData as byte-array
Returns
SHA384-value as byte-array
Exceptions
Exception

◆ HashSHA384() [2/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA384 ( string text,
Encoding? encoding = null )
static

Generates a SHA384-value as byte-array from a given string.

Parameters
textData as string
encodingEncoding of the string (optional, default: UTF8)
Returns
SHA384-value as byte-array
Exceptions
Exception

◆ HashSHA384File()

static byte[] BogaNet.Helper.HashHelper.HashSHA384File ( string file)
static

Generates a SHA384-value as byte-array from a file.

Parameters
fileFile to hash
Returns
SHA384-value as byte-array
Exceptions
Exception

◆ HashSHA384FileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashSHA384FileAsync ( string file)
static

Generates a SHA384-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
Returns
SHA384-value as byte-array
Exceptions
Exception

◆ HashSHA3_256() [1/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA3_256 ( params byte[] bytes)
static

Generates a SHA3-256-value as byte-array from a byte-array.

Parameters
bytesData as byte-array
Returns
SHA3-256-value as byte-array
Exceptions
Exception

◆ HashSHA3_256() [2/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA3_256 ( string text,
Encoding? encoding = null )
static

Generates a SHA3-256-value as byte-array from a string.

Parameters
textData as string
encodingEncoding of the string (optional, default: UTF8)
Returns
SHA3-256-value as byte-array
Exceptions
Exception

◆ HashSHA3_256File()

static byte[] BogaNet.Helper.HashHelper.HashSHA3_256File ( string file)
static

Generates a SHA3-256-value as byte-array from a file.

Parameters
fileFile to hash
Returns
SHA3-256-value as byte-array
Exceptions
Exception

◆ HashSHA3_256FileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashSHA3_256FileAsync ( string file)
static

Generates a SHA3-256-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
Returns
SHA3-256-value as byte-array
Exceptions
Exception

◆ HashSHA3_384() [1/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA3_384 ( params byte[] bytes)
static

Generates a SHA3-384-value as byte-array from a given byte-array.

Parameters
bytesData as byte-array
Returns
SHA3-384-value as byte-array
Exceptions
Exception

◆ HashSHA3_384() [2/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA3_384 ( string text,
Encoding? encoding = null )
static

Generates a SHA3-384-value as byte-array from a given string.

Parameters
textData as string
encodingEncoding of the string (optional, default: UTF8)
Returns
SHA3-384-value as byte-array
Exceptions
Exception

◆ HashSHA3_384File()

static byte[] BogaNet.Helper.HashHelper.HashSHA3_384File ( string file)
static

Generates a SHA3-384-value as byte-array from a file.

Parameters
fileFile to hash
Returns
SHA3-384-value as byte-array
Exceptions
Exception

◆ HashSHA3_384FileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashSHA3_384FileAsync ( string file)
static

Generates a SHA3-384-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
Returns
SHA3-384-value as byte-array
Exceptions
Exception

◆ HashSHA3_512() [1/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA3_512 ( params byte[] bytes)
static

Generates a SHA3-512-value as byte-array from a given byte-array.

Parameters
bytesData as byte-array
Returns
SHA3-512-value as byte-array
Exceptions
Exception

◆ HashSHA3_512() [2/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA3_512 ( string text,
Encoding? encoding = null )
static

Generates a SHA3-512-value as byte-array from a given string.

Parameters
textData as string
encodingEncoding of the string (optional, default: UTF8)
Returns
SHA3-512-value as byte-array
Exceptions
Exception

◆ HashSHA3_512File()

static byte[] BogaNet.Helper.HashHelper.HashSHA3_512File ( string file)
static

Generates a SHA3-512-value as byte-array from a file.

Parameters
fileFile to hash
Returns
SHA3-512-value as byte-array
Exceptions
Exception

◆ HashSHA3_512FileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashSHA3_512FileAsync ( string file)
static

Generates a SHA3-512-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
Returns
SHA3-512-value as byte-array
Exceptions
Exception

◆ HashSHA512() [1/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA512 ( params byte[] bytes)
static

Generates a SHA512-value as byte-array from a given byte-array.

Parameters
bytesData as byte-array
Returns
SHA512-value as byte-array
Exceptions
Exception

◆ HashSHA512() [2/2]

static byte[] BogaNet.Helper.HashHelper.HashSHA512 ( string text,
Encoding? encoding = null )
static

Generates a SHA512-value as byte-array from a given string.

Parameters
textData as string
encodingEncoding of the string (optional, default: UTF8)
Returns
SHA512-value as byte-array
Exceptions
Exception

◆ HashSHA512File()

static byte[] BogaNet.Helper.HashHelper.HashSHA512File ( string file)
static

Generates a SHA512-value as byte-array from a file.

Parameters
fileFile to hash
Returns
SHA512-value as byte-array
Exceptions
Exception

◆ HashSHA512FileAsync()

static async Task< byte[]> BogaNet.Helper.HashHelper.HashSHA512FileAsync ( string file)
static

Generates a SHA512-value as byte-array from a file asynchronously.

Parameters
fileFile to hash
Returns
SHA512-value as byte-array
Exceptions
Exception

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