/*
* 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/.
*/
namespace SafeExamBrowser.Configuration.Contracts.Integrity
{
///
/// Provides functionality related to application integrity.
///
public interface IIntegrityModule
{
///
/// Caches the specified session for later integrity verification.
///
void CacheSession(string configurationKey, string startUrl);
///
/// Removes the specified session from the integrity verification cache.
///
void ClearSession(string configurationKey, string startUrl);
///
/// Attempts to calculate the app signature key.
///
bool TryCalculateAppSignatureKey(string connectionToken, string salt, out string appSignatureKey);
///
/// Attempts to calculate the browser exam key.
///
bool TryCalculateBrowserExamKey(string configurationKey, string salt, out string browserExamKey);
///
/// Attempts to verify the code signature.
///
bool TryVerifyCodeSignature(out bool isValid);
///
/// Attempts to verify the integrity for the specified session.
///
bool TryVerifySessionIntegrity(string configurationKey, string startUrl, out bool isValid);
}
}