PrivateKey
struct PrivateKey
Represents a whole RSA key, public and private parts.
public_key
pub fn public_key(self): PublicKey
Get the public key from the private key.
public_key
pub fn public_key(self): PublicKey
Get the public key from the private key.
Get the public key from the private key.
to_pkcs8_pem
pub fn to_pkcs8_pem(self): string throws Pkcs8Error
Encode the PKCS#8-encoded private key to PEM.
to_pkcs8_pem
pub fn to_pkcs8_pem(self): string throws Pkcs8Error
Encode the PKCS#8-encoded private key to PEM.
Encode the PKCS#8-encoded private key to PEM.
to_pkcs8_der
pub fn to_pkcs8_der(self): Bytes throws Pkcs8Error
Encode the PKCS#8-encoded private key to ASN.1 DER-encoded data (binary format).
to_pkcs8_der
pub fn to_pkcs8_der(self): Bytes throws Pkcs8Error
Encode the PKCS#8-encoded private key to ASN.1 DER-encoded data (binary format).
Encode the PKCS#8-encoded private key to ASN.1 DER-encoded data (binary format).
to_pkcs1_pem
pub fn to_pkcs1_pem(self): string throws Pkcs1Error
Encode the PKCS#1-encoded private key to PEM.
to_pkcs1_pem
pub fn to_pkcs1_pem(self): string throws Pkcs1Error
Encode the PKCS#1-encoded private key to PEM.
Encode the PKCS#1-encoded private key to PEM.
to_pkcs1_der
pub fn to_pkcs1_der(self): Bytes throws Pkcs1Error
Encode the PKCS#1-encoded private key to ASN.1 DER-encoded data (binary format).
to_pkcs1_der
pub fn to_pkcs1_der(self): Bytes throws Pkcs1Error
Encode the PKCS#1-encoded private key to ASN.1 DER-encoded data (binary format).
Encode the PKCS#1-encoded private key to ASN.1 DER-encoded data (binary format).
operator!=:2
pub fn operator!=:2(self, b: PrivateKey): bool
operator!=:2
pub fn operator!=:2(self, b: PrivateKey): bool
operator==:2
pub fn operator==:2(self, b: PrivateKey): bool
operator==:2
pub fn operator==:2(self, b: PrivateKey): bool
_sign_pkcs1v15
pub fn _sign_pkcs1v15(self, digest: NativeHash, oid: Bytes, message: Bytes): Bytes throws RsaError
_sign_pkcs1v15
pub fn _sign_pkcs1v15(self, digest: NativeHash, oid: Bytes, message: Bytes): Bytes throws RsaError
decrypt_pkcs1v15
pub fn decrypt_pkcs1v15(self, message: Bytes): Bytes throws RsaError
Decrypts a message using RSA and the padding scheme from PKCS#1 v1.5.
decrypt_pkcs1v15
pub fn decrypt_pkcs1v15(self, message: Bytes): Bytes throws RsaError
Decrypts a message using RSA and the padding scheme from PKCS#1 v1.5.
Decrypts a message using RSA and the padding scheme from PKCS#1 v1.5.
_decrypt_oeap
pub fn _decrypt_oeap(self, digest: NativeHash, mgf_digest: NativeHash, message: Bytes, label: string?): Bytes throws RsaError
_decrypt_oeap
pub fn _decrypt_oeap(self, digest: NativeHash, mgf_digest: NativeHash, message: Bytes, label: string?): Bytes throws RsaError
parse_pkcs1_pem
pub fn parse_pkcs1_pem(pem: string): PrivateKey throws Pkcs1Error
Parse PKCS#1-encoded private key from PEM.
parse_pkcs1_pem
pub fn parse_pkcs1_pem(pem: string): PrivateKey throws Pkcs1Error
Parse PKCS#1-encoded private key from PEM.
Parse PKCS#1-encoded private key from PEM.
_new
pub fn _new(bit_size: int, rng: NativeRead): PrivateKey throws RsaError
_new
pub fn _new(bit_size: int, rng: NativeRead): PrivateKey throws RsaError
parse_pkcs8_pem
pub fn parse_pkcs8_pem(pem: string): PrivateKey throws Pkcs8Error
Parse PKCS#8-encoded private key from PEM.
parse_pkcs8_pem
pub fn parse_pkcs8_pem(pem: string): PrivateKey throws Pkcs8Error
Parse PKCS#8-encoded private key from PEM.
Parse PKCS#8-encoded private key from PEM.
parse_pkcs8_der
pub fn parse_pkcs8_der(data: Bytes): PrivateKey throws Pkcs8Error
Parse PKCS#8-encoded private key from ASN.1 DER-encoded data (binary format).
parse_pkcs8_der
pub fn parse_pkcs8_der(data: Bytes): PrivateKey throws Pkcs8Error
Parse PKCS#8-encoded private key from ASN.1 DER-encoded data (binary format).
Parse PKCS#8-encoded private key from ASN.1 DER-encoded data (binary format).
parse_pkcs1_der
pub fn parse_pkcs1_der(data: Bytes): PrivateKey throws Pkcs1Error
Parse PKCS#1-encoded private key from ASN.1 DER-encoded data (binary format).
parse_pkcs1_der
pub fn parse_pkcs1_der(data: Bytes): PrivateKey throws Pkcs1Error
Parse PKCS#1-encoded private key from ASN.1 DER-encoded data (binary format).
Parse PKCS#1-encoded private key from ASN.1 DER-encoded data (binary format).