/*
* Copyright (c) 2024 ETH Zürich, IT Services
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using System.IO;
namespace SafeExamBrowser.Configuration.Contracts.Cryptography
{
///
/// Encrypts and decrypts data with a password.
///
public interface IPasswordEncryption
{
///
/// Attempts to decrypt the given data. The decrypted data stream can only be considered valid if
/// is returned!
///
LoadStatus Decrypt(Stream data, string password, out Stream decrypted);
///
/// Attempts to encrypt the given data. The encrypted data stream can only be considered valid if
/// is returned.
///
SaveStatus Encrypt(Stream data, string password, out Stream encrypted);
}
}