PublicKey
struct PublicKey
operator !=
pub fn operator !=(self, b: PublicKey): bool
operator !=
pub fn operator !=(self, b: PublicKey): bool
operator ==
pub fn operator ==(self, b: PublicKey): bool
operator ==
pub fn operator ==(self, b: PublicKey): bool
Create a new public key from its components.
Create a new public key from its components.
Create a new public key from its components.
parse_pkcs1_der
pub fn parse_pkcs1_der(data: Bytes): PublicKey throws Pkcs1Error
Parse PKCS#1-encoded public key from ASN.1 DER-encoded data (binary format).
parse_pkcs1_der
pub fn parse_pkcs1_der(data: Bytes): PublicKey throws Pkcs1Error
Parse PKCS#1-encoded public key from ASN.1 DER-encoded data (binary format).
Parse PKCS#1-encoded public key from ASN.1 DER-encoded data (binary format).
parse_pkcs1_pem
pub fn parse_pkcs1_pem(pem: string): PublicKey throws Pkcs1Error
Parse PKCS#1-encoded public key from PEM.
parse_pkcs1_pem
pub fn parse_pkcs1_pem(pem: string): PublicKey throws Pkcs1Error
Parse PKCS#1-encoded public key from PEM.
Parse PKCS#1-encoded public key from PEM.
parse_spki_der
pub fn parse_spki_der(data: Bytes): PublicKey throws SpkiError
Parse SPKI-encoded public key from ASN.1 DER-encoded data (binary format).
parse_spki_der
pub fn parse_spki_der(data: Bytes): PublicKey throws SpkiError
Parse SPKI-encoded public key from ASN.1 DER-encoded data (binary format).
Parse SPKI-encoded public key from ASN.1 DER-encoded data (binary format).
parse_spki_pem
pub fn parse_spki_pem(pem: string): PublicKey throws SpkiError
Parse SPKI-encoded public key from PEM.
parse_spki_pem
pub fn parse_spki_pem(pem: string): PublicKey throws SpkiError
Parse SPKI-encoded public key from PEM.
Parse SPKI-encoded public key from PEM.
encrypt_oeap
pub fn encrypt_oeap<T>(self, message: Bytes, label: string? = nil, rng: Read = RandReader.new()): Bytes throws RsaError
[src]
pub fn encrypt_oeap<T: Hash>(
self, message: Bytes, label: string? = nil, rng: Read = RandReader.new()
): Bytes throws RsaError {
return try self
._encrypt_oeap(
_create_native_read(rng),
_create_native_hash(T.new()),
_create_native_hash(T.new()),
message,
label
);
}
Encrypts the given message with RSA and the padding scheme from PKCS#1 OAEP.
encrypt_oeap
pub fn encrypt_oeap<T>(self, message: Bytes, label: string? = nil, rng: Read = RandReader.new()): Bytes throws RsaError
[src]
pub fn encrypt_oeap<T: Hash>(
self, message: Bytes, label: string? = nil, rng: Read = RandReader.new()
): Bytes throws RsaError {
return try self
._encrypt_oeap(
_create_native_read(rng),
_create_native_hash(T.new()),
_create_native_hash(T.new()),
message,
label
);
}
Encrypts the given message with RSA and the padding scheme from PKCS#1 OAEP.
Encrypts the given message with RSA and the padding scheme from PKCS#1 OAEP.
encrypt_pkcs1v15
pub fn encrypt_pkcs1v15(self, message: Bytes, rng: Read = RandReader.new()): Bytes throws RsaError
[src]
pub fn encrypt_pkcs1v15(self, message: Bytes, rng: Read = RandReader.new()): Bytes throws RsaError {
return try self._encrypt_pkcs1v15(_create_native_read(rng), message);
}
Encrypts the given message with RSA and the padding scheme from PKCS#1 v1.5.
encrypt_pkcs1v15
pub fn encrypt_pkcs1v15(self, message: Bytes, rng: Read = RandReader.new()): Bytes throws RsaError
[src]
pub fn encrypt_pkcs1v15(self, message: Bytes, rng: Read = RandReader.new()): Bytes throws RsaError {
return try self._encrypt_pkcs1v15(_create_native_read(rng), message);
}
Encrypts the given message with RSA and the padding scheme from PKCS#1 v1.5.
Encrypts the given message with RSA and the padding scheme from PKCS#1 v1.5.
The message must be no longer than the length of the public modulus minus 11 bytes.
Returns the exponent of the public key.
Returns the exponent of the public key.
Returns the exponent of the public key.
Returns the modulus of the public key.
Returns the modulus of the public key.
Returns the modulus of the public key.
to_pkcs1_der
pub fn to_pkcs1_der(self): Bytes throws Pkcs1Error
Encode the PKCS#1-encoded public 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 public key to ASN.1 DER-encoded data (binary format).
Encode the PKCS#1-encoded public 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 public key to PEM.
to_pkcs1_pem
pub fn to_pkcs1_pem(self): string throws Pkcs1Error
Encode the PKCS#1-encoded public key to PEM.
Encode the PKCS#1-encoded public key to PEM.
to_spki_der
pub fn to_spki_der(self): Bytes throws SpkiError
Encode the SPKI-encoded public key to ASN.1 DER-encoded data (binary format).
to_spki_der
pub fn to_spki_der(self): Bytes throws SpkiError
Encode the SPKI-encoded public key to ASN.1 DER-encoded data (binary format).
Encode the SPKI-encoded public key to ASN.1 DER-encoded data (binary format).
to_spki_pem
pub fn to_spki_pem(self): string throws SpkiError
Encode the SPKI-encoded public key to PEM.
to_spki_pem
pub fn to_spki_pem(self): string throws SpkiError
Encode the SPKI-encoded public key to PEM.
Encode the SPKI-encoded public key to PEM.
verify_pkcs1v15
pub fn verify_pkcs1v15<T>(self, message: Bytes, sig: Bytes): bool
[src]
pub fn verify_pkcs1v15<T: Hash + AssociatedOid>(self, message: Bytes, sig: Bytes): bool {
let digest = T.new();
let oid = digest.oid();
return self._verify_pkcs1v15(_create_native_hash(digest), oid.bytes(), message, sig);
}
Verifies an RSA PKCS#1 v1.5 signature.
verify_pkcs1v15
pub fn verify_pkcs1v15<T>(self, message: Bytes, sig: Bytes): bool
[src]
pub fn verify_pkcs1v15<T: Hash + AssociatedOid>(self, message: Bytes, sig: Bytes): bool {
let digest = T.new();
let oid = digest.oid();
return self._verify_pkcs1v15(_create_native_hash(digest), oid.bytes(), message, sig);
}
Verifies an RSA PKCS#1 v1.5 signature.
Verifies an RSA PKCS#1 v1.5 signature.
verify_pss
pub fn verify_pss<T>(self, message: Bytes, sig: Bytes, salt_len: int? = nil): bool
[src]
pub fn verify_pss<T: Hash>(self, message: Bytes, sig: Bytes, salt_len: int? = nil): bool {
return self._verify_pss(_create_native_hash(T.new()), message, sig, salt_len);
}
Verifies an PSS signature.
verify_pss
pub fn verify_pss<T>(self, message: Bytes, sig: Bytes, salt_len: int? = nil): bool
[src]
pub fn verify_pss<T: Hash>(self, message: Bytes, sig: Bytes, salt_len: int? = nil): bool {
return self._verify_pss(_create_native_hash(T.new()), message, sig, salt_len);
}
Verifies an PSS signature.
Verifies an PSS signature.