Browse Source

Docs - Add variables to String-Encrytion code samples

pull/8976/head
enisn 5 years ago
parent
commit
531d93b3d9
  1. 14
      docs/en/String-Encryption.md

14
docs/en/String-Encryption.md

@ -70,13 +70,13 @@ All encryption operations are included in `IStringEncryptionService`. You can in
```csharp ```csharp
// Default Pass Phrase // Default Pass Phrase
StringEncryptionService.Encrypt(value); var encryptedValue = StringEncryptionService.Encrypt(value);
// Custom Pass Phrase // Custom Pass Phrase
StringEncryptionService.Encrypt(value, "MyCustomPassPhrase"); var encryptedValue = StringEncryptionService.Encrypt(value, "MyCustomPassPhrase");
// Encrypt & Decrypt have same parameters. // Encrypt & Decrypt have same parameters.
StringEncryptionService.Decrypt(value, "MyCustomPassPhrase"); var decryptedValue = StringEncryptionService.Decrypt(value, "MyCustomPassPhrase");
``` ```
### Using Custom Salt ### Using Custom Salt
@ -85,13 +85,13 @@ StringEncryptionService.Decrypt(value, "MyCustomPassPhrase");
```csharp ```csharp
// Default Salt // Default Salt
StringEncryptionService.Encrypt(value); var encryptedValue = StringEncryptionService.Encrypt(value);
// Custom Salt // Custom Salt
StringEncryptionService.Encrypt(value, salt: Encoding.UTF8.GetBytes("MyCustomSalt")); var encryptedValue = StringEncryptionService.Encrypt(value, salt: Encoding.UTF8.GetBytes("MyCustomSalt"));
// Encrypt & Decrypt have same parameters. // Encrypt & Decrypt have same parameters.
StringEncryptionService.Decrypt(value, salt: Encoding.UTF8.GetBytes("MyCustomSalt")); var decryptedValue = StringEncryptionService.Decrypt(value, salt: Encoding.UTF8.GetBytes("MyCustomSalt"));
``` ```
*** ***
@ -122,4 +122,4 @@ Configure<AbpStringEncryptionOptions>(opts =>
- **Keysize:** This constant is used to determine the keysize of the encryption algorithm. - **Keysize:** This constant is used to determine the keysize of the encryption algorithm.
Default value: `256` Default value: `256`
Loading…
Cancel
Save