Skip to content

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehjohn committed Feb 13, 2024
1 parent 19e501b commit 54e5148
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,51 @@

Various useful security classes.

## Security.Console

Wrapper to execute the various functions.

### Splitting a secret

Change directory to `src/Security.Console`, then:

```
> dotnet run ToBase64 -t "This is a secret"
Original text: This is a secret
Base 64: VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA=
> dotnet run SplitSecret -s VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA= --Parts 6 -m 3
1: wbHdhyMsmB0tFR0TN/ekJ/mL9v4nerTU9iIRDSsV70tX
2: Ys5m0fnyge8q+ovn3F/O0OY7L4LgsJ50iMEy5RIwAqGt
3: 8yu7Ptq3GYEHz5ad69tq1x/R2VzHuSrFfoAjmjlA7Z76
4: FEz96iMAh0uPef+dXdfFDuu3E2tVh7787Lwk+C8tNV9N
5: FakgBQBFHyWiTOLnalNhCRJd5bVyjgpNGv01hwRd2mAa
6: ttabU9qbBtelo3QTgfsL/g3tPMm1RCDtZB4Wbz14N4rg
Any 3 of these can be combined to obtain the original secret.
> dotnet run Combine --Parts 3
Please enter part 1
> wbHdhyMsmB0tFR0TN/ekJ/mL9v4nerTU9iIRDSsV70tX
> ********************************************
Please enter part 2
> 8yu7Ptq3GYEHz5ad69tq1x/R2VzHuSrFfoAjmjlA7Z76
> ********************************************
Please enter part 3
> FakgBQBFHyWiTOLnalNhCRJd5bVyjgpNGv01hwRd2mAa
> ********************************************
Secret: VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA=
> dotnet run FromBase64 -d VABoAGkAcwAgAGkAcwAgAGEAIABzAGUAYwByAGUAdAA=
Original text: This is a secret
```

## Security.Secrets.ShamirSecretShare

Split a secret piece of information into x parts, requiring y pieces to obtain the original message.
Expand Down

0 comments on commit 54e5148

Please sign in to comment.