Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wuriyanto48 committed Jan 21, 2023
1 parent 9af9014 commit a4ba525
Showing 1 changed file with 61 additions and 2 deletions.
63 changes: 61 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,65 @@ Custom crypto utility that wraps the DotNet `cryptography` API to make life easi
- Message authentication code with HMAC
- Generate Hash with Common DIGEST Algorithm

### Todo
### Add `NetCrypsi` to your project

- add more examples
Create new Solution
```shell
$ mkdir MyApp
$ cd MyApp/
$ dotnet new sln -n MyApp
The template "Solution File" was created successfully.
```

Create example console app inside `MyApp Solution`
```shell
$ dotnet new console -o MyApp.App
```

Add `MyApp.App` to `MyApp Solution`
```shell
$ dotnet sln MyApp.sln add MyApp.App/MyApp.App.csproj
```

Clone `NetCrypsi`
```shell
$ git clone https://github.com/telkomdev/NetCrypsi.git
```

Add `NetCrypsi.Lib` to `MyApp Solution`
```shell
$ dotnet sln MyApp.sln add NetCrypsi/NetCrypsi.Lib/NetCrypsi.Lib.csproj
```

Add Clone `NetCrypsi` to `MyApp.App` as a reference
```shell
$ dotnet add MyApp.App/MyApp.App.csproj reference NetCrypsi/NetCrypsi.Lib/NetCrypsi.Lib.csproj
```

Check MyApp reference
```shell
$ dotnet list MyApp.App/MyApp.App.csproj reference
Project reference(s)
--------------------
..\NetCrypsi\NetCrypsi.Lib\NetCrypsi.Lib.csproj
```

Edit `MyApp.App/Programm.cs`
```csharp
using System;
using System.Text;
using NetCrypsi.Lib;

// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

Console.WriteLine(Digestx.MD5Hex(Encoding.UTF8.GetBytes("wuriyanto")));
```

Run `MyApp.App`
```shell
$ cd MyApp.App/
$ dotnet run
Hello, World!
60E1BC04FA194A343B50CE67F4AFCFF8
```

0 comments on commit a4ba525

Please sign in to comment.