using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Developpez.Dotnet.Security.Cryptography
{
/// Encrypt or decrypt a file or content
public interface ICrypting
{
// Properties
/// Secret key
byte[] RgbKey { set; }
/// Initialisation vector
byte[] RgbIV { set; }
// Encrypting
/// Encrypt an object by using DES encrypting
/// Object to encrypt
/// Encrypted text
string EncryptContent(object objectToEncrypt);
/// Encrypt a file and replace its content
/// Path of the file
void Encrypt(string path);
/// Encrypt an non-crypted file into a new one
/// Path of the input file
/// Path of the output file
void Encrypt(string pathInput, string pathOutput);
// Decrypting
///
/// Decrypt a text.
/// Example:
///
/// var decrypter = new DESCrypting("abcd", "efgh");
/// var xdocument = XDocument.Parse(decrypter.DecryptContent(File.OpenText("FilePath").ReadToEnd));
///
///
/// Encrypted text
/// Decrypted text
string DecryptContent(string encryptedtext);
/// Decrypt a file and replace its content
/// Path of the file
void Decrypt(string path);
/// Decrypt an encrypted file into a new one
/// Path of the input file
/// Path of the output file
void Decrypt(string pathInput, string pathOutput);
}
}