PublicKeyInfo Class
Namespace: Rebex.Security.Cryptography.Pkcs
Assembly: Rebex.Common.dll (version 7.0.9083)
Represents a public key.
Syntax
public class PublicKeyInfo : PkcsBase
Inherited Members
Constructors
Name | Description |
---|---|
PublicKeyInfo() | Creates a new instance of PublicKeyInfo. Use the Load(Stream) method to load a public key. |
PublicKeyInfo(DSAParameters) | Creates a new instance of PublicKeyInfo based on the specified DSA parameters. |
PublicKeyInfo(RSAParameters) | Creates a new instance of PublicKeyInfo based on the specified RSA parameters. |
Properties
Name | Description |
---|---|
KeyAlgorithm | Gets the key algorithm identifier. |
Methods
Name | Description |
---|---|
Encode() | Gets ASN.1 encoded form of this PublicKeyInfo object. |
GetDSAParameters() | Gets the DSA parameters for a DSA public key. May only be used for DSA public keys. |
GetKeyAlgorithm() | Returns the key algorithm. |
GetKeySize() | Returns the size of the key in bits. |
GetRSAParameters() | Gets the RSA parameters for a RSA public key. May only be used for RSA public keys. |
Load(Stream) | Loads a PKCS #8 public key from a stream. Upon successful decoding, information can be retrieved using PublicKeyInfo methods and properties. |
Load(String) | Loads a PKCS #8 public key from a file. Upon successful decoding, information can be retrieved using PublicKeyInfo methods and properties. |
LoadSignedOrEnvelopedData(Stream, ICertificateFinder, Boolean) | Loads a CMS/PKCS #7 signed or enveloped message from a stream. Returns an instance of SignedData for signed message, EnvelopedData for enveloped message, or null for methods and properties. Inherited from PkcsBase. |
Save(Stream) | Saves the public key into the supplied stream in Base64-encoded PKCS #8 format. |
Save(String) | Saves the public key into the supplied stream in Base64-encoded PKCS #8 format. |
ToBytes() | Gets the raw form of the public key. |