Merge branch 'upstream'

Former-commit-id: b8b8ada98a8b77f6dec62d49df56d3601710c2af
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2020-01-08 09:05:42 +00:00
commit e7a15b3c24
80 changed files with 1719 additions and 56 deletions

View File

@ -1 +1 @@
049b897e1931b418af32b321b8bec26b0c4f1210
2ae91bb0c89c4f0998ae02dab64020503cbb6770

View File

@ -1 +1 @@
2460f68689d061e282b97ea542dea9e46ce5f0b5
25aab3b1ee524e128f9be3a269a94d1d17447248

View File

@ -21,14 +21,28 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsSigner))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Builder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12CertBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Info))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12KeyBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContents))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SecretBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
@ -36,6 +50,13 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampToken))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignedCms))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]

View File

@ -173,6 +173,120 @@ namespace System.Security.Cryptography.Pkcs
public override System.Security.Cryptography.Pkcs.SubjectIdentifier RecipientIdentifier { get { throw null; } }
public override int Version { get { throw null; } }
}
public sealed partial class Pkcs12Builder
{
public Pkcs12Builder() { }
public bool IsSealed { get { throw null; } }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, string password, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsUnencrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { }
public byte[] Encode() { throw null; }
public void SealWithMac(System.ReadOnlySpan<char> password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { }
public void SealWithMac(string password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { }
public void SealWithoutIntegrity() { }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Pkcs12CertBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12CertBag(System.Security.Cryptography.Oid certificateType, System.ReadOnlyMemory<byte> encodedCertificate) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> EncodedCertificate { get { throw null; } }
public bool IsX509Certificate { get { throw null; } }
public System.Security.Cryptography.X509Certificates.X509Certificate2 GetCertificate() { throw null; }
public System.Security.Cryptography.Oid GetCertificateType() { throw null; }
}
public enum Pkcs12ConfidentialityMode
{
None = 1,
Password = 2,
PublicKey = 3,
Unknown = 0,
}
public sealed partial class Pkcs12Info
{
internal Pkcs12Info() { }
public System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents> AuthenticatedSafe { get { throw null; } }
public System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Pkcs12Info Decode(System.ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false) { throw null; }
public bool VerifyMac(System.ReadOnlySpan<char> password) { throw null; }
public bool VerifyMac(string password) { throw null; }
}
public enum Pkcs12IntegrityMode
{
None = 1,
Password = 2,
PublicKey = 3,
Unknown = 0,
}
public sealed partial class Pkcs12KeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12KeyBag(System.ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = false) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> Pkcs8PrivateKey { get { throw null; } }
}
public abstract partial class Pkcs12SafeBag
{
protected Pkcs12SafeBag(string bagIdValue, System.ReadOnlyMemory<byte> encodedBagValue, bool skipCopy = false) { }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get { throw null; } }
public System.ReadOnlyMemory<byte> EncodedBagValue { get { throw null; } }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.Oid GetBagId() { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Pkcs12SafeContents
{
public Pkcs12SafeContents() { }
public System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode ConfidentialityMode { get { throw null; } }
public bool IsReadOnly { get { throw null; } }
public System.Security.Cryptography.Pkcs.Pkcs12CertBag AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12KeyBag AddKeyUnencrypted(System.Security.Cryptography.AsymmetricAlgorithm key) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag AddNestedContents(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { throw null; }
public void AddSafeBag(System.Security.Cryptography.Pkcs.Pkcs12SafeBag safeBag) { }
public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret(System.Security.Cryptography.Oid secretType, System.ReadOnlyMemory<byte> secretValue) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, string password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public void Decrypt(byte[] passwordBytes) { }
public void Decrypt(System.ReadOnlySpan<byte> passwordBytes) { }
public void Decrypt(System.ReadOnlySpan<char> password) { }
public void Decrypt(string password) { }
public System.Collections.Generic.IEnumerable<System.Security.Cryptography.Pkcs.Pkcs12SafeBag> GetBags() { throw null; }
}
public sealed partial class Pkcs12SafeContentsBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
internal Pkcs12SafeContentsBag() : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.Security.Cryptography.Pkcs.Pkcs12SafeContents SafeContents { get { throw null; } }
}
public sealed partial class Pkcs12SecretBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
internal Pkcs12SecretBag() : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> SecretValue { get { throw null; } }
public System.Security.Cryptography.Oid GetSecretType() { throw null; }
}
public sealed partial class Pkcs12ShroudedKeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12ShroudedKeyBag(System.ReadOnlyMemory<byte> encryptedPkcs8PrivateKey, bool skipCopy = false) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> EncryptedPkcs8PrivateKey { get { throw null; } }
}
public sealed partial class Pkcs8PrivateKeyInfo
{
public Pkcs8PrivateKeyInfo(System.Security.Cryptography.Oid algorithmId, System.Nullable<System.ReadOnlyMemory<byte>> algorithmParameters, System.ReadOnlyMemory<byte> privateKey, bool skipCopies = false) { }
public System.Security.Cryptography.Oid AlgorithmId { get { throw null; } }
public System.Nullable<System.ReadOnlyMemory<byte>> AlgorithmParameters { get { throw null; } }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get { throw null; } }
public System.ReadOnlyMemory<byte> PrivateKeyBytes { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Create(System.Security.Cryptography.AsymmetricAlgorithm privateKey) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Decode(System.ReadOnlyMemory<byte> source, out int bytesRead, bool skipCopy = false) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<byte> passwordBytes, System.ReadOnlyMemory<byte> source, out int bytesRead) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<char> password, System.ReadOnlyMemory<byte> source, out int bytesRead) { throw null; }
public byte[] Encode() { throw null; }
public byte[] Encrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public byte[] Encrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
public bool TryEncrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) { throw null; }
public bool TryEncrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public partial class Pkcs9AttributeObject : System.Security.Cryptography.AsnEncodedData
{
public Pkcs9AttributeObject() { }
@ -204,6 +318,13 @@ namespace System.Security.Cryptography.Pkcs
public string DocumentName { get { throw null; } }
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) { }
}
public sealed partial class Pkcs9LocalKeyId : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public Pkcs9LocalKeyId() { }
public Pkcs9LocalKeyId(byte[] keyId) { }
public Pkcs9LocalKeyId(System.ReadOnlySpan<byte> keyId) { }
public System.ReadOnlyMemory<byte> KeyId { get { throw null; } }
}
public sealed partial class Pkcs9MessageDigest : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public Pkcs9MessageDigest() { }
@ -259,6 +380,56 @@ namespace System.Security.Cryptography.Pkcs
KeyTransport = 1,
Unknown = 0,
}
public sealed partial class Rfc3161TimestampRequest
{
internal Rfc3161TimestampRequest() { }
public bool HasExtensions { get { throw null; } }
public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } }
public System.Security.Cryptography.Oid RequestedPolicyId { get { throw null; } }
public bool RequestSignerCertificate { get { throw null; } }
public int Version { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; }
public System.ReadOnlyMemory<byte> GetMessageHash() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetNonce() { throw null; }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampToken ProcessResponse(System.ReadOnlyMemory<byte> responseBytes, out int bytesConsumed) { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest request, out int bytesConsumed) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Rfc3161TimestampToken
{
internal Rfc3161TimestampToken() { }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo TokenInfo { get { throw null; } }
public System.Security.Cryptography.Pkcs.SignedCms AsSignedCms() { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampToken token, out int bytesConsumed) { throw null; }
public bool VerifySignatureForData(System.ReadOnlySpan<byte> data, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
}
public sealed partial class Rfc3161TimestampTokenInfo
{
public Rfc3161TimestampTokenInfo(System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, System.ReadOnlyMemory<byte> messageHash, System.ReadOnlyMemory<byte> serialNumber, System.DateTimeOffset timestamp, System.Nullable<long> accuracyInMicroseconds = default(System.Nullable<long>), bool isOrdering = false, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), System.Nullable<System.ReadOnlyMemory<byte>> timestampAuthorityName = default(System.Nullable<System.ReadOnlyMemory<byte>>), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { }
public System.Nullable<long> AccuracyInMicroseconds { get { throw null; } }
public bool HasExtensions { get { throw null; } }
public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } }
public bool IsOrdering { get { throw null; } }
public System.Security.Cryptography.Oid PolicyId { get { throw null; } }
public System.DateTimeOffset Timestamp { get { throw null; } }
public int Version { get { throw null; } }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; }
public System.ReadOnlyMemory<byte> GetMessageHash() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetNonce() { throw null; }
public System.ReadOnlyMemory<byte> GetSerialNumber() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetTimestampAuthorityName() { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class SignedCms
{
public SignedCms() { }

View File

@ -21,14 +21,28 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsSigner))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Builder))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12CertBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Info))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12KeyBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContents))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SecretBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
@ -36,6 +50,13 @@
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampToken))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignedCms))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfo))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoCollection))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoEnumerator))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
[assembly:System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]

View File

@ -173,6 +173,120 @@ namespace System.Security.Cryptography.Pkcs
public override System.Security.Cryptography.Pkcs.SubjectIdentifier RecipientIdentifier { get { throw null; } }
public override int Version { get { throw null; } }
}
public sealed partial class Pkcs12Builder
{
public Pkcs12Builder() { }
public bool IsSealed { get { throw null; } }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, string password, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsUnencrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { }
public byte[] Encode() { throw null; }
public void SealWithMac(System.ReadOnlySpan<char> password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { }
public void SealWithMac(string password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { }
public void SealWithoutIntegrity() { }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Pkcs12CertBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12CertBag(System.Security.Cryptography.Oid certificateType, System.ReadOnlyMemory<byte> encodedCertificate) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> EncodedCertificate { get { throw null; } }
public bool IsX509Certificate { get { throw null; } }
public System.Security.Cryptography.X509Certificates.X509Certificate2 GetCertificate() { throw null; }
public System.Security.Cryptography.Oid GetCertificateType() { throw null; }
}
public enum Pkcs12ConfidentialityMode
{
None = 1,
Password = 2,
PublicKey = 3,
Unknown = 0,
}
public sealed partial class Pkcs12Info
{
internal Pkcs12Info() { }
public System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents> AuthenticatedSafe { get { throw null; } }
public System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Pkcs12Info Decode(System.ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false) { throw null; }
public bool VerifyMac(System.ReadOnlySpan<char> password) { throw null; }
public bool VerifyMac(string password) { throw null; }
}
public enum Pkcs12IntegrityMode
{
None = 1,
Password = 2,
PublicKey = 3,
Unknown = 0,
}
public sealed partial class Pkcs12KeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12KeyBag(System.ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = false) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> Pkcs8PrivateKey { get { throw null; } }
}
public abstract partial class Pkcs12SafeBag
{
protected Pkcs12SafeBag(string bagIdValue, System.ReadOnlyMemory<byte> encodedBagValue, bool skipCopy = false) { }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get { throw null; } }
public System.ReadOnlyMemory<byte> EncodedBagValue { get { throw null; } }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.Oid GetBagId() { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Pkcs12SafeContents
{
public Pkcs12SafeContents() { }
public System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode ConfidentialityMode { get { throw null; } }
public bool IsReadOnly { get { throw null; } }
public System.Security.Cryptography.Pkcs.Pkcs12CertBag AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12KeyBag AddKeyUnencrypted(System.Security.Cryptography.AsymmetricAlgorithm key) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag AddNestedContents(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { throw null; }
public void AddSafeBag(System.Security.Cryptography.Pkcs.Pkcs12SafeBag safeBag) { }
public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret(System.Security.Cryptography.Oid secretType, System.ReadOnlyMemory<byte> secretValue) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, string password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public void Decrypt(byte[] passwordBytes) { }
public void Decrypt(System.ReadOnlySpan<byte> passwordBytes) { }
public void Decrypt(System.ReadOnlySpan<char> password) { }
public void Decrypt(string password) { }
public System.Collections.Generic.IEnumerable<System.Security.Cryptography.Pkcs.Pkcs12SafeBag> GetBags() { throw null; }
}
public sealed partial class Pkcs12SafeContentsBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
internal Pkcs12SafeContentsBag() : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.Security.Cryptography.Pkcs.Pkcs12SafeContents SafeContents { get { throw null; } }
}
public sealed partial class Pkcs12SecretBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
internal Pkcs12SecretBag() : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> SecretValue { get { throw null; } }
public System.Security.Cryptography.Oid GetSecretType() { throw null; }
}
public sealed partial class Pkcs12ShroudedKeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12ShroudedKeyBag(System.ReadOnlyMemory<byte> encryptedPkcs8PrivateKey, bool skipCopy = false) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> EncryptedPkcs8PrivateKey { get { throw null; } }
}
public sealed partial class Pkcs8PrivateKeyInfo
{
public Pkcs8PrivateKeyInfo(System.Security.Cryptography.Oid algorithmId, System.Nullable<System.ReadOnlyMemory<byte>> algorithmParameters, System.ReadOnlyMemory<byte> privateKey, bool skipCopies = false) { }
public System.Security.Cryptography.Oid AlgorithmId { get { throw null; } }
public System.Nullable<System.ReadOnlyMemory<byte>> AlgorithmParameters { get { throw null; } }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get { throw null; } }
public System.ReadOnlyMemory<byte> PrivateKeyBytes { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Create(System.Security.Cryptography.AsymmetricAlgorithm privateKey) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Decode(System.ReadOnlyMemory<byte> source, out int bytesRead, bool skipCopy = false) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<byte> passwordBytes, System.ReadOnlyMemory<byte> source, out int bytesRead) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<char> password, System.ReadOnlyMemory<byte> source, out int bytesRead) { throw null; }
public byte[] Encode() { throw null; }
public byte[] Encrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public byte[] Encrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
public bool TryEncrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) { throw null; }
public bool TryEncrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public partial class Pkcs9AttributeObject : System.Security.Cryptography.AsnEncodedData
{
public Pkcs9AttributeObject() { }
@ -204,6 +318,13 @@ namespace System.Security.Cryptography.Pkcs
public string DocumentName { get { throw null; } }
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) { }
}
public sealed partial class Pkcs9LocalKeyId : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public Pkcs9LocalKeyId() { }
public Pkcs9LocalKeyId(byte[] keyId) { }
public Pkcs9LocalKeyId(System.ReadOnlySpan<byte> keyId) { }
public System.ReadOnlyMemory<byte> KeyId { get { throw null; } }
}
public sealed partial class Pkcs9MessageDigest : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public Pkcs9MessageDigest() { }
@ -259,6 +380,56 @@ namespace System.Security.Cryptography.Pkcs
KeyTransport = 1,
Unknown = 0,
}
public sealed partial class Rfc3161TimestampRequest
{
internal Rfc3161TimestampRequest() { }
public bool HasExtensions { get { throw null; } }
public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } }
public System.Security.Cryptography.Oid RequestedPolicyId { get { throw null; } }
public bool RequestSignerCertificate { get { throw null; } }
public int Version { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; }
public System.ReadOnlyMemory<byte> GetMessageHash() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetNonce() { throw null; }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampToken ProcessResponse(System.ReadOnlyMemory<byte> responseBytes, out int bytesConsumed) { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest request, out int bytesConsumed) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Rfc3161TimestampToken
{
internal Rfc3161TimestampToken() { }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo TokenInfo { get { throw null; } }
public System.Security.Cryptography.Pkcs.SignedCms AsSignedCms() { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampToken token, out int bytesConsumed) { throw null; }
public bool VerifySignatureForData(System.ReadOnlySpan<byte> data, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
}
public sealed partial class Rfc3161TimestampTokenInfo
{
public Rfc3161TimestampTokenInfo(System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, System.ReadOnlyMemory<byte> messageHash, System.ReadOnlyMemory<byte> serialNumber, System.DateTimeOffset timestamp, System.Nullable<long> accuracyInMicroseconds = default(System.Nullable<long>), bool isOrdering = false, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), System.Nullable<System.ReadOnlyMemory<byte>> timestampAuthorityName = default(System.Nullable<System.ReadOnlyMemory<byte>>), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { }
public System.Nullable<long> AccuracyInMicroseconds { get { throw null; } }
public bool HasExtensions { get { throw null; } }
public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } }
public bool IsOrdering { get { throw null; } }
public System.Security.Cryptography.Oid PolicyId { get { throw null; } }
public System.DateTimeOffset Timestamp { get { throw null; } }
public int Version { get { throw null; } }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; }
public System.ReadOnlyMemory<byte> GetMessageHash() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetNonce() { throw null; }
public System.ReadOnlyMemory<byte> GetSerialNumber() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetTimestampAuthorityName() { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class SignedCms
{
public SignedCms() { }

View File

@ -208,6 +208,120 @@ namespace System.Security.Cryptography.Pkcs
public override System.Security.Cryptography.Pkcs.SubjectIdentifier RecipientIdentifier { get { throw null; } }
public override int Version { get { throw null; } }
}
public sealed partial class Pkcs12Builder
{
public Pkcs12Builder() { }
public bool IsSealed { get { throw null; } }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsEncrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents, string password, System.Security.Cryptography.PbeParameters pbeParameters) { }
public void AddSafeContentsUnencrypted(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { }
public byte[] Encode() { throw null; }
public void SealWithMac(System.ReadOnlySpan<char> password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { }
public void SealWithMac(string password, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, int iterationCount) { }
public void SealWithoutIntegrity() { }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Pkcs12CertBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12CertBag(System.Security.Cryptography.Oid certificateType, System.ReadOnlyMemory<byte> encodedCertificate) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> EncodedCertificate { get { throw null; } }
public bool IsX509Certificate { get { throw null; } }
public System.Security.Cryptography.X509Certificates.X509Certificate2 GetCertificate() { throw null; }
public System.Security.Cryptography.Oid GetCertificateType() { throw null; }
}
public enum Pkcs12ConfidentialityMode
{
None = 1,
Password = 2,
PublicKey = 3,
Unknown = 0,
}
public sealed partial class Pkcs12Info
{
internal Pkcs12Info() { }
public System.Collections.ObjectModel.ReadOnlyCollection<System.Security.Cryptography.Pkcs.Pkcs12SafeContents> AuthenticatedSafe { get { throw null; } }
public System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode IntegrityMode { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Pkcs12Info Decode(System.ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false) { throw null; }
public bool VerifyMac(System.ReadOnlySpan<char> password) { throw null; }
public bool VerifyMac(string password) { throw null; }
}
public enum Pkcs12IntegrityMode
{
None = 1,
Password = 2,
PublicKey = 3,
Unknown = 0,
}
public sealed partial class Pkcs12KeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12KeyBag(System.ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = false) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> Pkcs8PrivateKey { get { throw null; } }
}
public abstract partial class Pkcs12SafeBag
{
protected Pkcs12SafeBag(string bagIdValue, System.ReadOnlyMemory<byte> encodedBagValue, bool skipCopy = false) { }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get { throw null; } }
public System.ReadOnlyMemory<byte> EncodedBagValue { get { throw null; } }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.Oid GetBagId() { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Pkcs12SafeContents
{
public Pkcs12SafeContents() { }
public System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode ConfidentialityMode { get { throw null; } }
public bool IsReadOnly { get { throw null; } }
public System.Security.Cryptography.Pkcs.Pkcs12CertBag AddCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12KeyBag AddKeyUnencrypted(System.Security.Cryptography.AsymmetricAlgorithm key) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag AddNestedContents(System.Security.Cryptography.Pkcs.Pkcs12SafeContents safeContents) { throw null; }
public void AddSafeBag(System.Security.Cryptography.Pkcs.Pkcs12SafeBag safeBag) { }
public System.Security.Cryptography.Pkcs.Pkcs12SecretBag AddSecret(System.Security.Cryptography.Oid secretType, System.ReadOnlyMemory<byte> secretValue) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, byte[] passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag AddShroudedKey(System.Security.Cryptography.AsymmetricAlgorithm key, string password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public void Decrypt(byte[] passwordBytes) { }
public void Decrypt(System.ReadOnlySpan<byte> passwordBytes) { }
public void Decrypt(System.ReadOnlySpan<char> password) { }
public void Decrypt(string password) { }
public System.Collections.Generic.IEnumerable<System.Security.Cryptography.Pkcs.Pkcs12SafeBag> GetBags() { throw null; }
}
public sealed partial class Pkcs12SafeContentsBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
internal Pkcs12SafeContentsBag() : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.Security.Cryptography.Pkcs.Pkcs12SafeContents SafeContents { get { throw null; } }
}
public sealed partial class Pkcs12SecretBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
internal Pkcs12SecretBag() : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> SecretValue { get { throw null; } }
public System.Security.Cryptography.Oid GetSecretType() { throw null; }
}
public sealed partial class Pkcs12ShroudedKeyBag : System.Security.Cryptography.Pkcs.Pkcs12SafeBag
{
public Pkcs12ShroudedKeyBag(System.ReadOnlyMemory<byte> encryptedPkcs8PrivateKey, bool skipCopy = false) : base (default(string), default(System.ReadOnlyMemory<byte>), default(bool)) { }
public System.ReadOnlyMemory<byte> EncryptedPkcs8PrivateKey { get { throw null; } }
}
public sealed partial class Pkcs8PrivateKeyInfo
{
public Pkcs8PrivateKeyInfo(System.Security.Cryptography.Oid algorithmId, System.Nullable<System.ReadOnlyMemory<byte>> algorithmParameters, System.ReadOnlyMemory<byte> privateKey, bool skipCopies = false) { }
public System.Security.Cryptography.Oid AlgorithmId { get { throw null; } }
public System.Nullable<System.ReadOnlyMemory<byte>> AlgorithmParameters { get { throw null; } }
public System.Security.Cryptography.CryptographicAttributeObjectCollection Attributes { get { throw null; } }
public System.ReadOnlyMemory<byte> PrivateKeyBytes { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Create(System.Security.Cryptography.AsymmetricAlgorithm privateKey) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo Decode(System.ReadOnlyMemory<byte> source, out int bytesRead, bool skipCopy = false) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<byte> passwordBytes, System.ReadOnlyMemory<byte> source, out int bytesRead) { throw null; }
public static System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo DecryptAndDecode(System.ReadOnlySpan<char> password, System.ReadOnlyMemory<byte> source, out int bytesRead) { throw null; }
public byte[] Encode() { throw null; }
public byte[] Encrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public byte[] Encrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
public bool TryEncrypt(System.ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) { throw null; }
public bool TryEncrypt(System.ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public partial class Pkcs9AttributeObject : System.Security.Cryptography.AsnEncodedData
{
public Pkcs9AttributeObject() { }
@ -239,6 +353,13 @@ namespace System.Security.Cryptography.Pkcs
public string DocumentName { get { throw null; } }
public override void CopyFrom(System.Security.Cryptography.AsnEncodedData asnEncodedData) { }
}
public sealed partial class Pkcs9LocalKeyId : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public Pkcs9LocalKeyId() { }
public Pkcs9LocalKeyId(byte[] keyId) { }
public Pkcs9LocalKeyId(System.ReadOnlySpan<byte> keyId) { }
public System.ReadOnlyMemory<byte> KeyId { get { throw null; } }
}
public sealed partial class Pkcs9MessageDigest : System.Security.Cryptography.Pkcs.Pkcs9AttributeObject
{
public Pkcs9MessageDigest() { }
@ -294,6 +415,56 @@ namespace System.Security.Cryptography.Pkcs
KeyTransport = 1,
Unknown = 0,
}
public sealed partial class Rfc3161TimestampRequest
{
internal Rfc3161TimestampRequest() { }
public bool HasExtensions { get { throw null; } }
public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } }
public System.Security.Cryptography.Oid RequestedPolicyId { get { throw null; } }
public bool RequestSignerCertificate { get { throw null; } }
public int Version { get { throw null; } }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromData(System.ReadOnlySpan<byte> data, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromHash(System.ReadOnlyMemory<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public static System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest CreateFromSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, System.Security.Cryptography.Oid requestedPolicyId = null, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), bool requestSignerCertificates = false, System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { throw null; }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; }
public System.ReadOnlyMemory<byte> GetMessageHash() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetNonce() { throw null; }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampToken ProcessResponse(System.ReadOnlyMemory<byte> responseBytes, out int bytesConsumed) { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest request, out int bytesConsumed) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class Rfc3161TimestampToken
{
internal Rfc3161TimestampToken() { }
public System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo TokenInfo { get { throw null; } }
public System.Security.Cryptography.Pkcs.SignedCms AsSignedCms() { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampToken token, out int bytesConsumed) { throw null; }
public bool VerifySignatureForData(System.ReadOnlySpan<byte> data, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.HashAlgorithmName hashAlgorithm, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForHash(System.ReadOnlySpan<byte> hash, System.Security.Cryptography.Oid hashAlgorithmId, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
public bool VerifySignatureForSignerInfo(System.Security.Cryptography.Pkcs.SignerInfo signerInfo, out System.Security.Cryptography.X509Certificates.X509Certificate2 signerCertificate, System.Security.Cryptography.X509Certificates.X509Certificate2Collection extraCandidates = null) { throw null; }
}
public sealed partial class Rfc3161TimestampTokenInfo
{
public Rfc3161TimestampTokenInfo(System.Security.Cryptography.Oid policyId, System.Security.Cryptography.Oid hashAlgorithmId, System.ReadOnlyMemory<byte> messageHash, System.ReadOnlyMemory<byte> serialNumber, System.DateTimeOffset timestamp, System.Nullable<long> accuracyInMicroseconds = default(System.Nullable<long>), bool isOrdering = false, System.Nullable<System.ReadOnlyMemory<byte>> nonce = default(System.Nullable<System.ReadOnlyMemory<byte>>), System.Nullable<System.ReadOnlyMemory<byte>> timestampAuthorityName = default(System.Nullable<System.ReadOnlyMemory<byte>>), System.Security.Cryptography.X509Certificates.X509ExtensionCollection extensions = null) { }
public System.Nullable<long> AccuracyInMicroseconds { get { throw null; } }
public bool HasExtensions { get { throw null; } }
public System.Security.Cryptography.Oid HashAlgorithmId { get { throw null; } }
public bool IsOrdering { get { throw null; } }
public System.Security.Cryptography.Oid PolicyId { get { throw null; } }
public System.DateTimeOffset Timestamp { get { throw null; } }
public int Version { get { throw null; } }
public byte[] Encode() { throw null; }
public System.Security.Cryptography.X509Certificates.X509ExtensionCollection GetExtensions() { throw null; }
public System.ReadOnlyMemory<byte> GetMessageHash() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetNonce() { throw null; }
public System.ReadOnlyMemory<byte> GetSerialNumber() { throw null; }
public System.Nullable<System.ReadOnlyMemory<byte>> GetTimestampAuthorityName() { throw null; }
public static bool TryDecode(System.ReadOnlyMemory<byte> encodedBytes, out System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo timestampTokenInfo, out int bytesConsumed) { throw null; }
public bool TryEncode(System.Span<byte> destination, out int bytesWritten) { throw null; }
}
public sealed partial class SignedCms
{
public SignedCms() { }

View File

@ -41,7 +41,7 @@ static partial class Consts
// Use these assembly version constants to make code more maintainable.
//
public const string MonoVersion = "6.8.0.87";
public const string MonoVersion = "6.8.0.91";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -27,14 +27,28 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsSigner))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Builder))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12CertBag))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Info))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12KeyBag))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeBag))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContents))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SecretBag))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
@ -42,10 +56,15 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampToken))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignedCms))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfo))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoCollection))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoEnumerator))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Xml.X509IssuerSerial))]

View File

@ -0,0 +1,115 @@
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.Pkcs;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Enables the creation of PKCS#12 PFX data values. This class cannot be inherited.</summary>
public sealed class Pkcs12Builder {
/// <summary>Gets a value that indicates whether the PFX data has been sealed.</summary>
/// <returns>A value that indicates whether the PFX data has been sealed.</returns>
public bool IsSealed {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Add contents to the PFX in an bundle encrypted with a byte-based password from a byte array.</summary>
/// <param name="safeContents">The contents to add to the PFX.</param>
/// <param name="passwordBytes">The byte array to use as a password when encrypting the contents.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, byte[] passwordBytes, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Add contents to the PFX in an bundle encrypted with a byte-based password from a span.</summary>
/// <param name="safeContents">The contents to add to the PFX.</param>
/// <param name="passwordBytes">The byte span to use as a password when encrypting the contents.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Add contents to the PFX in an bundle encrypted with a char-based password from a span.</summary>
/// <param name="safeContents">The contents to add to the PFX.</param>
/// <param name="password">The span to use as a password when encrypting the contents.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, ReadOnlySpan<char> password, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Add contents to the PFX in an bundle encrypted with a char-based password from a string.</summary>
/// <param name="safeContents">The contents to add to the PFX.</param>
/// <param name="password">The string to use as a password when encrypting the contents.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, string password, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Add contents to the PFX without encrypting them.</summary>
/// <param name="safeContents">The contents to add to the PFX.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
public void AddSafeContentsUnencrypted (Pkcs12SafeContents safeContents) {
throw new PlatformNotSupportedException ();
}
/// <summary>Encodes the contents of a sealed PFX and returns it as a byte array.</summary>
/// <returns>A byte array representing the encoded form of the PFX.</returns>
/// <exception cref="T:System.InvalidOperationException">The PFX is not sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="false" />).</exception>
public byte[] Encode () {
throw new PlatformNotSupportedException ();
}
/// <summary>Seals the PFX against further changes by applying a password-based Message Authentication Code (MAC) over the contents with a password from a span.</summary>
/// <param name="password">The password to use as a key for computing the MAC.</param>
/// <param name="hashAlgorithm">The hash algorithm to use when computing the MAC.</param>
/// <param name="iterationCount">The iteration count for the Key Derivation Function (KDF) used in computing the MAC.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="iterationCount" /> parameter is less than or equal to 0.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
public void SealWithMac (ReadOnlySpan<char> password, HashAlgorithmName hashAlgorithm, int iterationCount) {
throw new PlatformNotSupportedException ();
}
/// <summary>Seals the PFX against further changes by applying a password-based Message Authentication Code (MAC) over the contents with a password from a string.</summary>
/// <param name="password">The password to use as a key for computing the MAC.</param>
/// <param name="hashAlgorithm">The hash algorithm to use when computing the MAC.</param>
/// <param name="iterationCount">The iteration count for the Key Derivation Function (KDF) used in computing the MAC.</param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="iterationCount" /> parameter is less than or equal to 0.</exception>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
public void SealWithMac (string password, HashAlgorithmName hashAlgorithm, int iterationCount) {
throw new PlatformNotSupportedException ();
}
/// <summary>Seals the PFX from further changes without applying tamper-protection.</summary>
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
public void SealWithoutIntegrity () {
throw new PlatformNotSupportedException ();
}
/// <summary>Attempts to encode the contents of a sealed PFX into a provided buffer.</summary>
/// <param name="destination">The byte span to receive the PKCS#12 PFX data.</param>
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
/// <returns>
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.InvalidOperationException">The PFX is not sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="false" />).</exception>
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,50 @@
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.Pkcs;
using System.Security.Cryptography.X509Certificates;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the PKCS#12 CertBag. This class cannot be inherited.</summary>
public sealed class Pkcs12CertBag : Pkcs12SafeBag {
/// <summary>Gets the uninterpreted certificate contents of the CertSafeBag.</summary>
/// <returns>The uninterpreted certificate contents of the CertSafeBag.</returns>
public ReadOnlyMemory<byte> EncodedCertificate {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Gets a value indicating whether the content type of the encoded certificate value is the X.509 public key certificate content type.</summary>
/// <returns>
/// <see langword="true" /> if the content type is the X.509 public key certificate content type (1.2.840.113549.1.9.22.1); otherwise, <see langword="false" />.</returns>
public bool IsX509Certificate {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12CertBag" /> class using the specified certificate type and encoding.</summary>
/// <param name="certificateType">The Object Identifier (OID) for the certificate type.</param>
/// <param name="encodedCertificate">The encoded certificate value.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="certificateType" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encodedCertificate" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
public Pkcs12CertBag (Oid certificateType, ReadOnlyMemory<byte> encodedCertificate)
: base (null, default(ReadOnlyMemory<byte>)) {
throw new PlatformNotSupportedException ();
}
/// <summary>Gets the contents of the CertBag interpreted as an X.509 public key certificate.</summary>
/// <returns>A certificate decoded from the contents of the CertBag.</returns>
/// <exception cref="">The content type is not the X.509 public key certificate content type.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents were not valid for the X.509 certificate content type.</exception>
public X509Certificate2 GetCertificate () {
throw new PlatformNotSupportedException ();
}
/// <summary>Gets the Object Identifier (OID) which identifies the content type of the encoded certificte value.</summary>
/// <returns>The Object Identifier (OID) which identifies the content type of the encoded certificate value.</returns>
public Oid GetCertificateType () {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,13 @@
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the kind of encryption associated with a PKCS#12 SafeContents value.</summary>
public enum Pkcs12ConfidentialityMode {
/// <summary>The SafeContents value is not encrypted.</summary>
None = 1,
/// <summary>The SafeContents value is encrypted with a password.</summary>
Password = 2,
/// <summary>The SafeContents value is encrypted using public key cryptography.</summary>
PublicKey = 3,
/// <summary>The kind of encryption applied to the SafeContents is unknown or could not be determined.</summary>
Unknown = 0
}
}

View File

@ -0,0 +1,59 @@
using System;
using System.Collections.ObjectModel;
using System.Security.Cryptography.Pkcs;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the data from PKCS#12 PFX contents. This class cannot be inherited.</summary>
public sealed class Pkcs12Info {
/// <summary>Gets a read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</summary>
/// <returns>A read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</returns>
public ReadOnlyCollection<Pkcs12SafeContents> AuthenticatedSafe {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Gets a value that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</summary>
/// <returns>One of the enumeration members that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</returns>
public Pkcs12IntegrityMode IntegrityMode {
get {
throw new PlatformNotSupportedException ();
}
}
internal Pkcs12Info () {
throw new PlatformNotSupportedException ();
}
/// <summary>Reads the provided data as a PKCS#12 PFX and returns an object view of the contents.</summary>
/// <param name="encodedBytes">The data to interpret as a PKCS#12 PFX.</param>
/// <param name="bytesConsumed">When this method returns, contains a value that indicates the number of bytes from <paramref name="encodedBytes" /> which were read by this method. This parameter is treated as uninitialized.</param>
/// <param name="skipCopy">
/// <see langword="true" /> to store <paramref name="encodedBytes" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
/// <returns>An object view of the PKCS#12 PFX decoded from the input.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents of the <paramref name="encodedBytes" /> parameter were not successfully decoded as a PKCS#12 PFX.</exception>
public static Pkcs12Info Decode (ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false) {
throw new PlatformNotSupportedException ();
}
/// <summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="System.ReadOnlySpan{System.Char}" />.</summary>
/// <param name="password">The password to use to attempt to verify integrity.</param>
/// <returns>
/// <see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
public bool VerifyMac (ReadOnlySpan<char> password) {
throw new PlatformNotSupportedException ();
}
/// <summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="T:System.String" />.</summary>
/// <param name="password">The password to use to attempt to verify integrity.</param>
/// <returns>
/// <see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
public bool VerifyMac (string password) {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,13 @@
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the type of anti-tampering applied to a PKCS#12 PFX value.</summary>
public enum Pkcs12IntegrityMode {
/// <summary>The PKCS#12 PFX value is not protected from tampering.</summary>
None = 1,
/// <summary>The PKCS#12 PFX value is protected from tampering with a Message Authentication Code (MAC) keyed with a password.</summary>
Password = 2,
/// <summary>The PKCS#12 PFX value is protected from tampering with a digital signature using public key cryptography.</summary>
PublicKey = 3,
/// <summary>The type of anti-tampering applied to the PKCS#12 PFX is unknown or could not be determined.</summary>
Unknown = 0
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Security.Cryptography.Pkcs;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the KeyBag from PKCS#12, a container whose contents are a PKCS#8 PrivateKeyInfo. This class cannot be inherited.</summary>
public sealed class Pkcs12KeyBag : Pkcs12SafeBag {
/// <summary>Gets a memory value containing the PKCS#8 PrivateKeyInfo value transported by this bag.</summary>
/// <returns>A memory value containing the PKCS#8 PrivateKeyInfo value transported by this bag.</returns>
public ReadOnlyMemory<byte> Pkcs8PrivateKey {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12KeyBag" /> from an existing encoded PKCS#8 PrivateKeyInfo value.</summary>
/// <param name="pkcs8PrivateKey">A BER-encoded PKCS#8 PrivateKeyInfo value.</param>
/// <param name="skipCopy">
/// <see langword="true" /> to store <paramref name="pkcs8PrivateKey" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="pkcs8privateKey" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
public Pkcs12KeyBag (ReadOnlyMemory<byte> pkcs8PrivateKey, bool skipCopy = false)
: base (null, default(ReadOnlyMemory<byte>)) {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,57 @@
using System;
using System.Security.Cryptography;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Defines the core behavior of a SafeBag value from the PKCS#12 specification and provides a base for derived classes.</summary>
public abstract class Pkcs12SafeBag {
/// <summary>Gets the modifiable collection of attributes to encode with the SafeBag value.</summary>
/// <returns>The modifiable collection of attributes to encode with the SafeBag value.</returns>
public CryptographicAttributeObjectCollection Attributes {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Gets the ASN.1 BER encoding of the contents of this SafeBag.</summary>
/// <returns>The ASN.1 BER encoding of the contents of this SafeBag.</returns>
public ReadOnlyMemory<byte> EncodedBagValue {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Called from constructors in derived classes to initialize the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12SafeBag" /> class.</summary>
/// <param name="bagIdValue">The Object Identifier (OID), in dotted decimal form, indicating the data type of this SafeBag.</param>
/// <param name="encodedBagValue">The ASN.1 BER encoded value of the SafeBag contents.</param>
/// <param name="skipCopy">
/// <see langword="true" /> to store <paramref name="encodedBagValue" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="bagIdValue" /> parameter is <see langword="null" /> or the empty string.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encodedBagValue" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
protected Pkcs12SafeBag (string bagIdValue, ReadOnlyMemory<byte> encodedBagValue, bool skipCopy = false) {
throw new PlatformNotSupportedException ();
}
/// <summary>Encodes the SafeBag value and returns it as a byte array.</summary>
/// <returns>A byte array representing the encoded form of the SafeBag.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The object identifier value passed to the constructor was invalid.</exception>
public byte[] Encode () {
throw new PlatformNotSupportedException ();
}
/// <summary>Gets the Object Identifier (OID) identifying the content type of this SafeBag.</summary>
/// <returns>The Object Identifier (OID) identifying the content type of this SafeBag.</returns>
public Oid GetBagId () {
throw new PlatformNotSupportedException ();
}
/// <summary>Attempts to encode the SafeBag value into a provided buffer.</summary>
/// <param name="destination">The byte span to receive the encoded SafeBag value.</param>
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
/// <returns>
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The object identifier value passed to the constructor was invalid.</exception>
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,171 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Security.Cryptography.Pkcs;
using System.Security.Cryptography.X509Certificates;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents a PKCS#12 SafeContents value. This class cannot be inherited.</summary>
public sealed class Pkcs12SafeContents {
/// <summary>Gets a value that indicates the type of encryption applied to the contents.</summary>
/// <returns>One of the enumeration values that indicates the type of encryption applied to the contents. The default value is <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.None" />.</returns>
public Pkcs12ConfidentialityMode ConfidentialityMode {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Gets a value that indicates whether this instance in a read-only state.</summary>
/// <returns>
/// <see langword="true" /> if this value is in a read-only state; otherwise, <see langword="false" />. The default value is <see langword="false" />.</returns>
public bool IsReadOnly {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Adds a certificate to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12CertBag" /> and returns the newly created bag instance.</summary>
/// <param name="certificate">The certificate to add.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="certificate" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="certificate" /> parameter is in an invalid state.</exception>
public Pkcs12CertBag AddCertificate (X509Certificate2 certificate) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds an asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12KeyBag" /> and returns the newly created bag instance.</summary>
/// <param name="key">The asymmetric private key to add.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
public Pkcs12KeyBag AddKeyUnencrypted (AsymmetricAlgorithm key) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds a nested SafeContents to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag" /> and returns the newly created bag instance.</summary>
/// <param name="safeContents">The nested contents to add to the SafeContents.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter is encrypted.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
public Pkcs12SafeContentsBag AddNestedContents (Pkcs12SafeContents safeContents) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds a SafeBag to the SafeContents.</summary>
/// <param name="safeBag">The SafeBag value to add.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeBag" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
public void AddSafeBag (Pkcs12SafeBag safeBag) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds an ASN.1 BER-encoded value with a specified type identifier to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12SecretBag" /> and returns the newly created bag instance.</summary>
/// <param name="secretType">The Object Identifier (OID) which identifies the data type of the secret value.</param>
/// <param name="secretValue">The BER-encoded value representing the secret to add.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="secretType" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="secretValue" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
public Pkcs12SecretBag AddSecret (Oid secretType, ReadOnlyMemory<byte> secretValue) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a byte-based password in an array and returns the newly created bag instance.</summary>
/// <param name="key">The asymmetric private key to add.</param>
/// <param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, byte[] passwordBytes, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a byte-based password in a span and returns the newly created bag instance.</summary>
/// <param name="key">The asymmetric private key to add.</param>
/// <param name="passwordBytes">The bytes to use as a password when encrypting the key material.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a character-based password in a span and returns the newly created bag instance.</summary>
/// <param name="key">The asymmetric private key to add.</param>
/// <param name="password">The password to use when encrypting the key material.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, ReadOnlySpan<char> password, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Adds an encrypted asymmetric private key to the SafeContents via a new <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from a character-based password in a string and returns the newly created bag instance.</summary>
/// <param name="key">The asymmetric private key to add.</param>
/// <param name="password">The password to use when encrypting the key material.</param>
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the key material.</param>
/// <returns>The bag instance which was added to the SafeContents.</returns>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="key" /> parameter is <see langword="null" />.</exception>
/// <exception cref="T:System.InvalidOperationException">This instance is read-only.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The key export failed.</exception>
public Pkcs12ShroudedKeyBag AddShroudedKey (AsymmetricAlgorithm key, string password, PbeParameters pbeParameters) {
throw new PlatformNotSupportedException ();
}
/// <summary>Decrypts the contents of this SafeContents value using a byte-based password from an array.</summary>
/// <param name="passwordBytes">The bytes to use as a password for decrypting the encrypted contents.</param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
/// -or-
/// The contents were not successfully decrypted.</exception>
public void Decrypt (byte[] passwordBytes) {
throw new PlatformNotSupportedException ();
}
/// <summary>Decrypts the contents of this SafeContents value using a byte-based password from a span.</summary>
/// <param name="passwordBytes">The bytes to use as a password for decrypting the encrypted contents.</param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
/// -or-
/// The contents were not successfully decrypted.</exception>
public void Decrypt (ReadOnlySpan<byte> passwordBytes) {
throw new PlatformNotSupportedException ();
}
/// <summary>Decrypts the contents of this SafeContents value using a character-based password from a span.</summary>
/// <param name="password">The password to use for decrypting the encrypted contents.</param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
/// -or-
/// The contents were not successfully decrypted.</exception>
public void Decrypt (ReadOnlySpan<char> password) {
throw new PlatformNotSupportedException ();
}
/// <summary>Decrypts the contents of this SafeContents value using a character-based password from a string.</summary>
/// <param name="password">The password to use for decrypting the encrypted contents.</param>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12SafeContents.ConfidentialityMode" /> property is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode.Password" />.</exception>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The password is incorrect.
/// -or-
/// The contents were not successfully decrypted.</exception>
public void Decrypt (string password) {
throw new PlatformNotSupportedException ();
}
/// <summary>Gets an enumerable representation of the SafeBag values contained within the SafeContents.</summary>
/// <returns>An enumerable representation of the SafeBag values contained within the SafeContents.</returns>
/// <exception cref="T:System.InvalidOperationException">The contents are encrypted.</exception>
public IEnumerable<Pkcs12SafeBag> GetBags () {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Security.Cryptography.Pkcs;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the SafeContentsBag from PKCS#12, a container whose contents are a PKCS#12 SafeContents value. This class cannot be inherited.</summary>
public sealed class Pkcs12SafeContentsBag : Pkcs12SafeBag {
/// <summary>Gets the SafeContents value contained within this bag.</summary>
/// <returns>The SafeContents value contained within this bag.</returns>
public Pkcs12SafeContents SafeContents {
get {
throw new PlatformNotSupportedException ();
}
}
internal Pkcs12SafeContentsBag ()
: base (null, default(ReadOnlyMemory<byte>)) {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.Pkcs;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the SecretBag from PKCS#12, a container whose contents are arbitrary data with a type identifier. This class cannot be inherited.</summary>
public sealed class Pkcs12SecretBag : Pkcs12SafeBag {
/// <summary>Gets a memory value containing the BER-encoded contents of the bag.</summary>
/// <returns>A memory value containing the BER-encoded contents of the bag.</returns>
public ReadOnlyMemory<byte> SecretValue {
get {
throw new PlatformNotSupportedException ();
}
}
internal Pkcs12SecretBag ()
: base (null, default(ReadOnlyMemory<byte>)) {
throw new PlatformNotSupportedException ();
}
/// <summary>Gets the Object Identifier (OID) which identifies the data type of the secret value.</summary>
/// <returns>The Object Identifier (OID) which identifies the data type of the secret value.</returns>
public Oid GetSecretType () {
throw new PlatformNotSupportedException ();
}
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Security.Cryptography.Pkcs;
namespace System.Security.Cryptography.Pkcs {
/// <summary>Represents the ShroudedKeyBag from PKCS#12, a container whose contents are a PKCS#8 EncryptedPrivateKeyInfo. This class cannot be inherited.</summary>
public sealed class Pkcs12ShroudedKeyBag : Pkcs12SafeBag {
/// <summary>Gets a memory value containing the PKCS#8 EncryptedPrivateKeyInfo value transported by this bag.</summary>
/// <returns>A memory value containing the PKCS#8 EncryptedPrivateKeyInfo value transported by this bag.</returns>
public ReadOnlyMemory<byte> EncryptedPkcs8PrivateKey {
get {
throw new PlatformNotSupportedException ();
}
}
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag" /> from an existing encoded PKCS#8 EncryptedPrivateKeyInfo value.</summary>
/// <param name="encryptedPkcs8PrivateKey">A BER-encoded PKCS#8 EncryptedPrivateKeyInfo value.</param>
/// <param name="skipCopy">
/// <see langword="true" /> to store <paramref name="encryptedPkcs8PrivateKey" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encryptedPkcs8privateKey" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
public Pkcs12ShroudedKeyBag (ReadOnlyMemory<byte> encryptedPkcs8PrivateKey, bool skipCopy = false)
: base (null, default(ReadOnlyMemory<byte>)) {
throw new PlatformNotSupportedException ();
}
}
}

Some files were not shown because too many files have changed in this diff Show More