/*
 * 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.Cryptography
{
	/// 
	/// Provides funcionality to calculate keys for integrity checks.
	/// 
	public interface IKeyGenerator
	{
		/// 
		/// Calculates the encrypted value of the app signature key.
		/// 
		string CalculateAppSignatureKey(string connectionToken, string salt);
		/// 
		/// Calculates the hash value of the browser exam key (BEK) for the given URL.
		/// 
		string CalculateBrowserExamKeyHash(string configurationKey, byte[] salt, string url);
		/// 
		/// Calculates the hash value of the configuration key (CK) for the given URL.
		/// 
		string CalculateConfigurationKeyHash(string configurationKey, string url);
		/// 
		/// Specifies that a custom browser exam key (BEK) should be used.
		/// 
		void UseCustomBrowserExamKey(string browserExamKey);
	}
}