Skip to content

4.Sha1 Algorithm

Lucas Eschechola edited this page Dec 8, 2021 · 8 revisions

Here's an example of how to use the Sha1 algorithm cryptographic summary using the EscNet micro framework

First configure your dependency in your Startup.cs

services.AddSha1Hash();



Now receive your dependency via constructor.

private readonly ISha1Hash _sha1Hash;

public MyClass(ISha1Hash sha1Hash){
    _sha1Hash = sha1Hash;
}



To generate Sha1 Hash use:

_sha1Hash.Hash("YOUR TEXT HERE!");




2021 ©


Clone this wiki locally