RSAPrivateKeyWithInfo class

An RSA private key with additional information.

This is a Pointy Castle RSAPrivateKey extended with additional members relating to encoding it in a file format. Namely, an optional comment and (if it was created by decoding text) source.

Methods for encoding it in different file formats are available. But normally programs can just invoke the encode method (defined by the PrivateKeyExt extension on the Pointy Castle PublicKey), with a format parameter -- that will cause one of these formatting methods to be invoked.

Inheritance
  • Object
  • RSAAsymmetricKey
  • RSAPrivateKey
  • RSAPrivateKeyWithInfo
Mixed in types
Available Extensions

Constructors

RSAPrivateKeyWithInfo(BigInt modulus, BigInt privateExponent, BigInt p, BigInt q)
Constructor from RSA private values.
RSAPrivateKeyWithInfo.fromRSAPrivateKey(RSAPrivateKey pc)
Constructor from Pointy Castle RSAPrivateKey.

Properties

comment String?
Comment associated with the private key.
getter/setter pairinherited
d BigInt?
Get private exponent d = e^-1
no setterinherited
exponent BigInt?
finalinherited
hashCode int
The hash code for this object.
no setterinherited
modulus BigInt?
finalinherited
n BigInt?
Get modulus n = p·q
no setterinherited
p BigInt?
finalinherited
privateExponent BigInt?
Get the private exponent (d)
no setterinherited
pubExponent BigInt?
Get the public exponent (e)
no setterinherited
publicExponent BigInt?
Get the public exponent (e)
no setterinherited
q BigInt?
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source PvtTextSource?
Section of text the private key was decoded from and the format decoded.
no setterinherited

Methods

encodeOpenSshPrivateKey() String
Encode into the OpenSSH Private Key format.
encodePkcs1PrivateKey(String passphrase) String
Encode into the PKCS#1 Private Key format.
encodePuttyPrivateKey(String passphrase) String
Encode into the PuTTY Private Key format.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited