Skip to content

Files

Latest commit

 

History

History
46 lines (34 loc) · 6.21 KB

Assorted.Utils.Crypto.CertExtenstions.md

File metadata and controls

46 lines (34 loc) · 6.21 KB

CertExtenstions Class

Namespace: Assorted.Utils.Crypto
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0
Inheritance: object CertExtenstions

Extends objects of type System.Security.Cryptography.X509Certificates.X509Certificate2.

Syntax

public static class CertExtenstions

Methods

Method Description
Decrypt(this X509Certificate2, Byte[]) Decrypts the ciphered data using the private key of the certificate and System.Security.Cryptography.RSAEncryptionPadding.OaepSHA1 padding mode.
Decrypt(this X509Certificate2, Byte[], RSAEncryptionPadding) Decrypts the ciphered data using the private key of the certificate and a specified padding mode.
Encrypt(this X509Certificate2, Byte[]) Encrypts the specified byte array using the public key of the certificate and System.Security.Cryptography.RSAEncryptionPadding.OaepSHA1 padding mode.
Encrypt(this X509Certificate2, Byte[], RSAEncryptionPadding) Encrypts the specified byte array using the public key of the certificate and a specified padding mode.
Sign(this X509Certificate2, Byte[]) Computes the hash value of the specified byte array using SHA-256 algorithm and PSS padding mode, and signs the resulting hash value.
Sign(this X509Certificate2, Byte[], HashAlgorithmName, RSASignaturePadding) Computes the hash value of the specified byte array using the specified hash algorithm and padding mode, and signs the resulting hash value.
Sign(this X509Certificate2, Stream) Computes the hash value of the specified stream using SHA-256 hash algorithm and PSS padding mode, and signs the resulting hash value.
Sign(this X509Certificate2, Stream, HashAlgorithmName, RSASignaturePadding) Computes the hash value of the specified stream using the specified hash algorithm and padding mode, and signs the resulting hash value.
Sign(this X509Certificate2, string) Computes the hash value of the specified string using SHA-256 hash algorithm and PSS padding mode, and signs the resulting hash value.
Sign(this X509Certificate2, string, HashAlgorithmName, RSASignaturePadding) Computes the hash value of the specified string using the specified hash algorithm and padding mode, and signs the resulting hash value.
VerifySignature(this X509Certificate2, Byte[], Byte[]) Verifies that a digital signature is valid by calculating the hash value of the specified data using SHA-256 hash algorithm and PSS padding mode, and comparing it to the provided signature.
VerifySignature(this X509Certificate2, Byte[], Byte[], HashAlgorithmName, RSASignaturePadding) Verifies that a digital signature is valid by calculating the hash value of the specified data using the specified hash algorithm and padding mode, and comparing it to the provided signature.
VerifySignature(this X509Certificate2, Stream, Byte[]) Verifies that a digital signature is valid by calculating the hash value of the specified stream using SHA-256 hash algorithm and PSS padding mode, and comparing it to the provided signature.
VerifySignature(this X509Certificate2, Stream, Byte[], HashAlgorithmName, RSASignaturePadding) Verifies that a digital signature is valid by calculating the hash value of the specified stream using the specified hash algorithm and padding mode, and comparing it to the provided signature.
VerifySignature(this X509Certificate2, string, Byte[]) Verifies that a digital signature is valid by calculating the hash value of the specified string using SHA-256 hash algorithm and PSS padding mode, and comparing it to the provided signature.
VerifySignature(this X509Certificate2, string, Byte[], HashAlgorithmName, RSASignaturePadding) Verifies that a digital signature is valid by calculating the hash value of the specified string using the specified hash algorithm and padding mode, and comparing it to the provided signature.

Thread Safety

Any public static member of this type is thread-safe, but instance members are not guaranteed to be thread-safe.

See Also


This document is generated by DG.