/// <summary> /// Compute the <see cref="SHA256"/> Hash with of the given <see cref="IHashable"/>. /// </summary> /// <param name="input">The <see cref="IHashable"/> to calculate the hash of.</param> /// <param name="hashingOptions">Optional. Options to change the behaviour of the hashing computation.</param> /// <returns></returns> public static HashResult <SHA256CryptoServiceProvider> Sha256(this IHashable input, HashingOptions hashingOptions = null) => input.Hash <SHA256CryptoServiceProvider>(hashingOptions);
/// <summary> /// Compute the <see cref="System.Security.Cryptography.MD5"/> Hash with of the given <see cref="IHashable"/>. /// </summary> /// <param name="input">The <see cref="IHashable"/> to calculate the hash of.</param> /// <param name="hashingOptions">Optional. Options to change the behaviour of the hashing computation.</param> /// <returns></returns> public static HashResult <MD5CryptoServiceProvider> MD5(this IHashable input, HashingOptions hashingOptions = null) => input.Hash <MD5CryptoServiceProvider>(hashingOptions);
public static void Process(IHashable hashable) => hashable.Hash();
public void HashOther(IHashable other) { other.Hash(this); }