Class RsaKey
An RSA key.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class RsaKey : AsymmetricKey
Properties
Coefficient
Gets or sets the private value inverse-Q.
Declaration
public byte[] Coefficient { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Exponent1
Gets or sets the private value DP.
Declaration
public byte[] Exponent1 { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Exponent2
Gets or sets the private value DQ.
Declaration
public byte[] Exponent2 { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Modulus
Gets or sets the public value N.
Declaration
public byte[] Modulus { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Prime1
Gets or sets the private value P.
Declaration
public byte[] Prime1 { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Prime2
Gets or sets the private value Q.
Declaration
public byte[] Prime2 { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
PrivateExponent
Gets or sets the private value D.
Declaration
public byte[] PrivateExponent { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
PublicExponent
Gets or sets the public value E.
Declaration
public byte[] PublicExponent { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Size
Gets the size of the key.
Declaration
public int Size { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Type
Gets the key type.
Declaration
public override AsymmetricKeyType Type { get; }
Property Value
Type | Description |
---|---|
AsymmetricKeyType |
Overrides
Methods
GetBytes()
Serializes this key to binary.
Declaration
public byte[] GetBytes()
Returns
Type | Description |
---|---|
System.Byte[] |
HasPrivate()
Returns true
if the key contains
private information.
Declaration
public override bool HasPrivate()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
HasPublic()
Returns true
if the key contains
public information.
Declaration
public override bool HasPublic()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
ParseBuffer(DataBuffer)
Deserializes a key from binary.
Declaration
public static RsaKey ParseBuffer(DataBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The buffer. |
Returns
Type | Description |
---|---|
RsaKey |
ParseBytes(Byte[])
Deserializes a key from binary.
Declaration
public static RsaKey ParseBytes(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | bytes | The bytes. |
Returns
Type | Description |
---|---|
RsaKey |