AsymmetricKeyAlgorithm.ImportKey Method
Namespace: Rebex.Security.Cryptography
Assembly: Rebex.Common.dll (version 7.0.9083)
ImportKey(PublicKeyInfo)
Imports a key from the specified public key info object.
Declaration
public void ImportKey(PublicKeyInfo key)
Parameters
Type | Name | Description |
---|---|---|
PublicKeyInfo | key | Public key info object. |
ImportKey(PrivateKeyInfo)
Imports a key from the specified private key info object.
Declaration
public void ImportKey(PrivateKeyInfo key)
Parameters
Type | Name | Description |
---|---|---|
PrivateKeyInfo | key | Private key info object. |
ImportKey(RSAParameters)
Imports a key from the specified RSA parameters.
Declaration
public void ImportKey(RSAParameters key)
Parameters
Type | Name | Description |
---|---|---|
RSAParameters | key | RSA key parameters. |
ImportKey(DSAParameters)
Imports a key from the specified DSA parameters.
Declaration
public void ImportKey(DSAParameters key)
Parameters
Type | Name | Description |
---|---|---|
DSAParameters | key | DSA key parameters. |
ImportKey(DiffieHellmanParameters)
Imports a private key from the specified Diffie-Hellman parameters, or generates a new key using P and G parameters.
Declaration
public void ImportKey(DiffieHellmanParameters key)
Parameters
Type | Name | Description |
---|---|---|
DiffieHellmanParameters | key | Diffie-Hellman key parameters. |
ImportKey(AsymmetricKeyAlgorithmId, String, Byte[], AsymmetricKeyFormat)
Imports a private key for the specified algorithm/curve. Only some algorithms/curves are supported.
Declaration
public void ImportKey(AsymmetricKeyAlgorithmId algorithm, string curve, byte[] key, AsymmetricKeyFormat format)
Parameters
Type | Name | Description |
---|---|---|
AsymmetricKeyAlgorithmId | algorithm | Key algorithm. |
String | curve | Key algorithm curve. |
Byte[] | key | Key data. |
AsymmetricKeyFormat | format | Key format. |