Class RsaKey
- Namespace
- Renci.SshNet.Security
- Assembly
- Renci.SshNet.dll
Contains the RSA private and public key.
public class RsaKey : Key, IDisposable
Inheritance
Implements
Inherited Members
Constructors
RsaKey(SshKeyData)
Initializes a new instance of the Renci.SshNet.Security.RsaKey class.
public RsaKey(SshKeyData publicKeyData)
Parameters
publicKeyData
SshKeyData-
The encoded public key data.
RsaKey(byte[])
Initializes a new instance of the Renci.SshNet.Security.RsaKey class.
public RsaKey(byte[] privateKeyData)
Parameters
privateKeyData
byte[]-
DER encoded private key data.
RsaKey(BigInteger, BigInteger, BigInteger, BigInteger, BigInteger, BigInteger)
Initializes a new instance of the Renci.SshNet.Security.RsaKey class.
public RsaKey(BigInteger modulus, BigInteger exponent, BigInteger d, BigInteger p, BigInteger q, BigInteger inverseQ)
Parameters
modulus
BigInteger-
The modulus.
exponent
BigInteger-
The exponent.
d
BigInteger-
The d.
p
BigInteger-
The p.
q
BigInteger-
The q.
inverseQ
BigInteger-
The inverse Q.
Properties
D
Gets the D.
public BigInteger D { get; }
Property Value
DP
Gets the DP.
public BigInteger DP { get; }
Property Value
DQ
Gets the DQ.
public BigInteger DQ { get; }
Property Value
DigitalSignature
Gets the digital signature implementation for this key.
protected override DigitalSignature DigitalSignature { get; }
Property Value
Exponent
Gets the exponent.
public BigInteger Exponent { get; }
Property Value
InverseQ
Gets the inverse Q.
public BigInteger InverseQ { get; }
Property Value
KeyLength
Gets the length of the key in bits.
public override int KeyLength { get; }
Property Value
Modulus
Gets the modulus.
public BigInteger Modulus { get; }
Property Value
P
Gets the P.
public BigInteger P { get; }
Property Value
Public
Gets the RSA public key.
public override BigInteger[] Public { get; }
Property Value
Q
Gets the Q.
public BigInteger Q { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Releases unmanaged and - optionally - managed resources.
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool-
true to release both managed and unmanaged resources; false to release only unmanaged resources.
ToString()
Gets the name of the key.
public override string ToString()
Returns
- string
-
The name of the key.