AsymmetricKeyAlgorithm Class
Namespace: Rebex.Security.Cryptography
Assembly: Rebex.Common.dll (version 7.0.9119)
A platform-independent asymmetric algorithm object.
Syntax
public class AsymmetricKeyAlgorithm : IDisposable
Implements
Inherited Members
Constructors
Name | Description |
---|---|
AsymmetricKeyAlgorithm() | Creates an instance of AsymmetricKeyAlgorithm. |
Properties
Name | Description |
---|---|
Algorithm | Gets the current key algorithm. |
KeySize | Gets the current key size. |
PublicOnly | Gets a value indicating whether this instance only contains the public key. |
Methods
Name | Description |
---|---|
CreateFrom(AsymmetricAlgorithm, Boolean) | Creates an instance of AsymmetricKeyAlgorithm from the specified asymmetric algorithm object. |
Decrypt(Byte[]) | Decrypts data. |
Decrypt(Byte[], EncryptionParameters) | Decrypts data. |
Dispose() | Frees the resources used by this object. |
Encrypt(Byte[]) | Encrypts data. |
Encrypt(Byte[], EncryptionParameters) | Encrypts data. |
GenerateDiffieHellmanParameters(Int32) | Generates Diffie-Hellman parameters corresponding to the specified key size. |
GenerateKey(AsymmetricKeyAlgorithmId, Int32) | Generates a private key for the specified asymmetric algorithm with of the specified key size. |
GenerateKey(AsymmetricKeyAlgorithmId, String) | Generates a private key for the specified asymmetric algorithm based on the specified curve. |
GetCspParameters() | Gets CSP parameters if the instance of AsymmetricKeyAlgorithm represents a key stored in a Windows Cryptographic Service Provider. |
GetKeyMaterialDeriver(Byte[]) | Gets key material deriver. Only supported by Diffie-Hellman-like algorithms. |
GetPrivateKey() | Exports a private key to the specified private key info object. |
GetPublicKey() | Exports a public key to the specified private key info object. |
ImportKey(AsymmetricKeyAlgorithmId, String, Byte[], AsymmetricKeyFormat) | Imports a private key for the specified algorithm/curve. Only some algorithms/curves are supported. |
ImportKey(DiffieHellmanParameters) | Imports a private key from the specified Diffie-Hellman parameters, or generates a new key using P and G parameters. |
ImportKey(PrivateKeyInfo) | Imports a key from the specified private key info object. |
ImportKey(PublicKeyInfo) | Imports a key from the specified public key info object. |
ImportKey(DSAParameters) | Imports a key from the specified DSA parameters. |
ImportKey(RSAParameters) | Imports a key from the specified RSA parameters. |
IsSupported(AsymmetricKeyAlgorithmId, String, Int32) | Returns a value indicating whether the specified algorithm is supported. |
Register(Func<String, Object>) | Register custom asymmetric key algorithm. |
SignHash(Byte[], SignatureHashAlgorithm) | Computes the signature for the specified hash value. |
SignMessage(Byte[]) | Computes the signature for the specified message (using default parameters). |
SignMessage(Byte[], SignatureParameters) | Computes the signature for the specified message. |
VerifyHash(Byte[], SignatureHashAlgorithm, Byte[]) | Verifies the specified signature. |
VerifyMessage(Byte[], Byte[]) | Verifies the specified signature (using default parameters). |
VerifyMessage(Byte[], Byte[], SignatureParameters) | Verifies the specified signature. |