2021-10-18 12:06:10 +02:00
|
|
|
|
/*
|
2024-03-05 18:37:42 +01:00
|
|
|
|
* Copyright (c) 2024 ETH Zürich, IT Services
|
2021-10-18 12:06:10 +02:00
|
|
|
|
*
|
|
|
|
|
* 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
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides funcionality to calculate keys for integrity checks.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IKeyGenerator
|
|
|
|
|
{
|
2023-03-02 23:48:11 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Calculates the encrypted value of the app signature key.
|
|
|
|
|
/// </summary>
|
|
|
|
|
string CalculateAppSignatureKey(string connectionToken, string salt);
|
|
|
|
|
|
2021-10-18 12:06:10 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Calculates the hash value of the browser exam key (BEK) for the given URL.
|
|
|
|
|
/// </summary>
|
2023-03-02 23:48:11 +01:00
|
|
|
|
string CalculateBrowserExamKeyHash(string configurationKey, byte[] salt, string url);
|
2021-10-18 12:06:10 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Calculates the hash value of the configuration key (CK) for the given URL.
|
|
|
|
|
/// </summary>
|
2023-03-02 23:48:11 +01:00
|
|
|
|
string CalculateConfigurationKeyHash(string configurationKey, string url);
|
2023-03-08 22:24:29 +01:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Specifies that a custom browser exam key (BEK) should be used.
|
|
|
|
|
/// </summary>
|
|
|
|
|
void UseCustomBrowserExamKey(string browserExamKey);
|
2021-10-18 12:06:10 +02:00
|
|
|
|
}
|
|
|
|
|
}
|