-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathSignatureAlgorithm.cs
More file actions
47 lines (42 loc) · 1.05 KB
/
SignatureAlgorithm.cs
File metadata and controls
47 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.Text;
namespace Waher.Security.PKCS
{
/// <summary>
/// Abstract base class for signature algorithms
/// </summary>
public abstract class SignatureAlgorithm
{
/// <summary>
/// Object Identity for the PKI algorithm.
/// </summary>
public abstract string PkiAlgorithmOID
{
get;
}
/// <summary>
/// Object Identity for the Hash algorithm.
/// </summary>
public abstract string HashAlgorithmOID
{
get;
}
/// <summary>
/// Exports the public key using DER.
/// </summary>
/// <param name="Output">Encoded output.</param>
public abstract void ExportPublicKey(DerEncoder Output);
/// <summary>
/// Exports the private key using DER.
/// </summary>
/// <param name="Output">Encoded output.</param>
public abstract void ExportPrivateKey(DerEncoder Output);
/// <summary>
/// Signs data.
/// </summary>
/// <param name="Data">Binary data to sign.</param>
/// <returns>Signature.</returns>
public abstract byte[] Sign(byte[] Data);
}
}