Interface IStringEncryptionService
Can be used to simply encrypt/decrypt texts. Use AbpStringEncryptionOptions to configure default values.
Namespace: Volo.Abp.Security.Encryption
Assembly: Volo.Abp.Security.dll
Syntax
public interface IStringEncryptionService
Methods
Decrypt(String, String, Byte[])
Decrypts a text that is encrypted by the Encrypt(String, String, Byte[]) method.
Declaration
string Decrypt(string cipherText, string passPhrase = null, byte[] salt = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | cipherText | The text in encrypted format |
System.String | passPhrase | A phrase to use as the encryption key (optional, uses default if not provided) |
System.Byte[] | salt | Salt value (optional, uses default if not provided) |
Returns
Type | Description |
---|---|
System.String | Decrypted text |
Encrypt(String, String, Byte[])
Encrypts a text.
Declaration
string Encrypt(string plainText, string passPhrase = null, byte[] salt = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | plainText | The text in plain format |
System.String | passPhrase | A phrase to use as the encryption key (optional, uses default if not provided) |
System.Byte[] | salt | Salt value (optional, uses default if not provided) |
Returns
Type | Description |
---|---|
System.String | Enrypted text |