Class NullEncryptionService
A null encryption service.
Inheritance
Inherited Members
Namespace: Kephas.Cryptography
Assembly: Kephas.Core.dll
Syntax
[OverridePriority(Priority.Lowest)]
public class NullEncryptionService : IEncryptionService, ISyncEncryptionService
Methods
| Improve this Doc View SourceDecrypt(Stream, Stream, IEncryptionContext)
Decrypts the input stream and writes the decrypted content into the output stream.
Declaration
public void Decrypt(Stream input, Stream output, IEncryptionContext context = null)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | The input stream. |
System.IO.Stream | output | The output stream. |
IEncryptionContext | context | The encryption context (optional). |
DecryptAsync(Stream, Stream, IEncryptionContext, CancellationToken)
Decrypts the input stream and writes the decrypted content into the output stream.
Declaration
public Task DecryptAsync(Stream input, Stream output, IEncryptionContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | The input stream. |
System.IO.Stream | output | The output stream. |
IEncryptionContext | context | The encryption context (optional). |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The asynchronous result. |
Encrypt(Stream, Stream, IEncryptionContext)
Encrypts the input stream and writes the encrypted content into the output stream.
Declaration
public void Encrypt(Stream input, Stream output, IEncryptionContext context = null)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | The input stream. |
System.IO.Stream | output | The output stream. |
IEncryptionContext | context | The encryption context (optional). |
EncryptAsync(Stream, Stream, IEncryptionContext, CancellationToken)
Encrypts the input stream and writes the encrypted content into the output stream.
Declaration
public Task EncryptAsync(Stream input, Stream output, IEncryptionContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | input | The input stream. |
System.IO.Stream | output | The output stream. |
IEncryptionContext | context | The encryption context (optional). |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | The asynchronous result. |
GenerateKey(IEncryptionContext)
Generates a key.
Declaration
public byte[] GenerateKey(IEncryptionContext encryptionContext = null)
Parameters
Type | Name | Description |
---|---|---|
IEncryptionContext | encryptionContext | Optional. Context for the encryption. |
Returns
Type | Description |
---|---|
System.Byte[] | An array of byte. |