This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Security.Cryptography; | |
/// <summary> | |
/// Computes and verifies proof-of-work challenges inspired by Hashcash to deter denial of service attacks and other service abuses such as spam. | |
/// </summary> | |
public sealed class HashPuzzle | |
{ | |
#region " Properties " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
/// <summary> | |
/// Specifies the name of a cryptographic HMAC algorithm. | |
/// </summary> | |
public struct HMACAlgorithmName : IEquatable<HMACAlgorithmName> | |
{ | |
#region " Members " | |
private readonly string _name; |