Class HashingServiceBase
A hashing service base.
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Cryptography
Assembly: Kephas.Core.dll
Syntax
public abstract class HashingServiceBase : IHashingService
Methods
| Improve this Doc View SourceCreateHashAlgorithm(IContext)
Creates the hash algorithm.
Declaration
protected abstract HashAlgorithm CreateHashAlgorithm(IContext context)
Parameters
Type | Name | Description |
---|---|---|
IContext | context | The context. |
Returns
Type | Description |
---|---|
System.Security.Cryptography.HashAlgorithm | The new hash algorithm. |
GetSaltedValue(Byte[], Byte[])
Gets salted value.
Declaration
protected virtual byte[] GetSaltedValue(byte[] value, byte[] saltBytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | The value to be hashed. |
System.Byte[] | saltBytes | The salt bytes (optional). |
Returns
Type | Description |
---|---|
System.Byte[] | The salted value. |
Hash(Byte[], IHashingContext)
Hashes the value with the optionally provided string.
Declaration
public virtual byte[] Hash(byte[] value, IHashingContext hashingContext = null)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | The value to be hashed. |
IHashingContext | hashingContext | Optional. Context for the hashing. |
Returns
Type | Description |
---|---|
System.Byte[] | The hashed value. |