in Notation.Plugin.AzureKeyVault/Protocol/GenerateSignature.cs [30:68]
public GenerateSignatureRequest(string contractVersion, string keyId, Dictionary<string, string>? pluginConfig, string keySpec, string hashAlgorithm, byte[] payload)
{
if (string.IsNullOrEmpty(contractVersion))
{
throw new ArgumentNullException(nameof(contractVersion), "ContractVersion must not be null or empty");
}
if (string.IsNullOrEmpty(keyId))
{
throw new ArgumentNullException(nameof(keyId), "KeyId must not be null or empty");
}
if (string.IsNullOrEmpty(keySpec))
{
throw new ArgumentNullException(nameof(keySpec), "KeySpec must not be null or empty");
}
if (string.IsNullOrEmpty(hashAlgorithm))
{
throw new ArgumentNullException(nameof(hashAlgorithm), "HashAlgorithm must not be null or empty");
}
if (payload == null || payload.Length == 0)
{
throw new ArgumentNullException(nameof(payload), "Payload must not be null or empty");
}
if (contractVersion != Protocol.ContractVersion)
{
throw new ValidationException($"Unsupported contract version: {contractVersion}");
}
ContractVersion = contractVersion;
KeyId = keyId;
PluginConfig = pluginConfig;
KeySpec = keySpec;
HashAlgorithm = hashAlgorithm;
Payload = payload;
}