Skip to content

nokitakaze/BlakeSharpNG

Repository files navigation

BlakeSharpNG

Build status Test status codecov Nuget version Total nuget downloads

This project is a C# implementation of original Blake. BLAKE is a cryptographic hash function based on Daniel J. Bernstein's ChaCha stream cipher, but a permuted copy of the input block. BLAKE was submitted to the NIST hash function competition as a proposal for next SHA-3 algorithm.

Public Classes

Classes Blake256 & Blake512 implement standard System.Security.Cryptography.HashAlgorithm.

Example

using var algo = new Blake256();
var hash = algo.ComputeHash("Hello, world");
var hashString = string.Concat(hash.Select(t => t.ToString("x2")));
Console.WriteLine(hashString);

Benchmark

Main benchmark

On AMD Ryzen 9 3900X BOX 3.8 GHz:

  • Blake256 — 38.72 MB/sec
  • Blake512 — 65.82 MB/sec

License

Licensed under the Code Project Open License 1.02.

Author is Dominik Reichl dominik.reichl@t-online.de, who is also the creator of KeePass. Source code used with his explicit permission.

Origin source code comes from