TypeDefinitions.ps1

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
$interfaces = @"
public interface IKey
{
    object ExportKey();
}
 
public interface ISigningKey : IKey
{
    string JwsAlgorithmName();
    System.Collections.Specialized.OrderedDictionary ExportPublicJwk();
 
    byte[] Sign(byte[] inputBytes);
    byte[] Sign(string inputString);
}
 
public interface IAccountKey : ISigningKey { }
 
public interface ICertificateKey : ISigningKey
{
    byte[] ExportPfx(byte[] acmeCertificate, System.Security.SecureString password);
    byte[] GenerateCsr(string[] dnsNames);
}
"@


Add-Type -TypeDefinition $interfaces