blob: 47b8bdefa8cba9fd884b594a7e7ebc0e835ee97a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.FSE.BL
{
/// <summary>
/// Represents an encryption/decryption mechanism for storing sensitive data using machine level protection.
/// </summary>
public interface ICryptographyProvider
{
/// <summary>
/// Encrypts the specified text.
/// </summary>
/// <param name="text">The text.</param>
/// <returns></returns>
String Encrypt(String text);
/// <summary>
/// Decrypts the specified encrypted text.
/// </summary>
/// <param name="encryptedText">The encrypted text.</param>
/// <returns></returns>
String Decrypt(String encryptedText);
/// <summary>
/// Encrypts the specified object.
/// </summary>
/// <param name="obj">The object.</param>
/// <returns></returns>
String Encrypt(Object obj);
/// <summary>
/// Decrypts the specified encrypted text.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="encryptedText">The encrypted text.</param>
/// <returns></returns>
T Decrypt<T>(String encryptedText);
}
}
|