Skip to content

Commit 216b7df

Browse files
authored
Update README.md
1 parent a941923 commit 216b7df

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

README.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
[![NuGet](https://img.shields.io/nuget/v/NETCore.Encrypt.svg)](https://nuget.org/packages/NETCore.Encrypt)
33
[![NETCore CLR](https://img.shields.io/badge/.NETCore%20Clr-2.0-brightgreen.svg)](https://www.microsoft.com/net/core)
44

5-
65
NETCore encrypt and decrpty tool,Include AES,RSA,MD5,SAH1,SAH256,SHA384,SHA512 and more
76

87
To install NETCore.Encrypt, run the following command in the [Package Manager Console](https://docs.microsoft.com/zh-cn/nuget/tools/package-manager-console)
98
```
10-
Install-Package NETCore.Encrypt -Version 2.0.1
9+
Install-Package NETCore.Encrypt -Version 2.0.2
1110
```
1211

1312
***
@@ -55,8 +54,32 @@ Install-Package NETCore.Encrypt -Version 2.0.1
5554
var encryptedStr = "xxxx";
5655
var decrypted = EncryptProvider.AESDecrypt(encryptedStr, key, iv);
5756
```
57+
## DES
58+
59+
- #### Create DES Key
60+
61+
```csharp
62+
63+
//des key length is 24 bit
64+
var desKey = EncryptProvider.CreateDesKey();
65+
66+
```
67+
68+
- #### DES encrypt
69+
70+
```csharp
71+
var srcString = "des encrypt";
72+
var encrypted = EncryptProvider.DESEncrypt(srcString, key);
73+
```
5874

59-
## RSA
75+
- #### DES decrypt
76+
77+
```csharp
78+
var encryptedStr = "xxxx";
79+
var decrypted = EncryptProvider.DESDecrypt(encryptedStr, key);
80+
```
81+
82+
## RSA
6083

6184
- #### Enum RsaSize
6285

0 commit comments

Comments
 (0)