pub struct RsaPublicKey<'a> {
pub modulus: UintRef<'a>,
pub public_exponent: UintRef<'a>,
}
Expand description
PKCS#1 RSA Public Keys as defined in RFC 8017 Appendix 1.1.
ASN.1 structure containing a serialized RSA public key:
RSAPublicKey ::= SEQUENCE {
modulus INTEGER, -- n
publicExponent INTEGER -- e
}
Fields§
§modulus: UintRef<'a>
n
: RSA modulus
public_exponent: UintRef<'a>
e
: RSA public exponent
Trait Implementations§
source§impl<'a> Clone for RsaPublicKey<'a>
impl<'a> Clone for RsaPublicKey<'a>
source§fn clone(&self) -> RsaPublicKey<'a>
fn clone(&self) -> RsaPublicKey<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for RsaPublicKey<'a>
impl<'a> Debug for RsaPublicKey<'a>
source§impl<'a> DecodeValue<'a> for RsaPublicKey<'a>
impl<'a> DecodeValue<'a> for RsaPublicKey<'a>
source§impl EncodeValue for RsaPublicKey<'_>
impl EncodeValue for RsaPublicKey<'_>
source§impl<'a> From<&RsaPrivateKey<'a>> for RsaPublicKey<'a>
impl<'a> From<&RsaPrivateKey<'a>> for RsaPublicKey<'a>
source§fn from(private_key: &RsaPrivateKey<'a>) -> RsaPublicKey<'a>
fn from(private_key: &RsaPrivateKey<'a>) -> RsaPublicKey<'a>
Converts to this type from the input type.
source§impl<'a> From<RsaPrivateKey<'a>> for RsaPublicKey<'a>
impl<'a> From<RsaPrivateKey<'a>> for RsaPublicKey<'a>
source§fn from(private_key: RsaPrivateKey<'a>) -> RsaPublicKey<'a>
fn from(private_key: RsaPrivateKey<'a>) -> RsaPublicKey<'a>
Converts to this type from the input type.
source§impl<'a> PartialEq for RsaPublicKey<'a>
impl<'a> PartialEq for RsaPublicKey<'a>
source§impl PemLabel for RsaPublicKey<'_>
impl PemLabel for RsaPublicKey<'_>
source§impl<'a> TryFrom<&'a [u8]> for RsaPublicKey<'a>
impl<'a> TryFrom<&'a [u8]> for RsaPublicKey<'a>
source§impl TryFrom<&RsaPublicKey<'_>> for Document
impl TryFrom<&RsaPublicKey<'_>> for Document
source§impl TryFrom<RsaPublicKey<'_>> for Document
impl TryFrom<RsaPublicKey<'_>> for Document
impl<'a> Copy for RsaPublicKey<'a>
impl<'a> Eq for RsaPublicKey<'a>
impl<'a> Sequence<'a> for RsaPublicKey<'a>
impl<'a> StructuralPartialEq for RsaPublicKey<'a>
Auto Trait Implementations§
impl<'a> Freeze for RsaPublicKey<'a>
impl<'a> RefUnwindSafe for RsaPublicKey<'a>
impl<'a> Send for RsaPublicKey<'a>
impl<'a> Sync for RsaPublicKey<'a>
impl<'a> Unpin for RsaPublicKey<'a>
impl<'a> UnwindSafe for RsaPublicKey<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
impl<'a, T> Decode<'a> for Twhere
T: DecodeValue<'a> + FixedTag,
source§impl<T> DecodePem for Twhere
T: DecodeOwned + PemLabel,
impl<T> DecodePem for Twhere
T: DecodeOwned + PemLabel,
source§impl<T> Encode for Twhere
T: EncodeValue + Tagged,
impl<T> Encode for Twhere
T: EncodeValue + Tagged,
source§fn encoded_len(&self) -> Result<Length, Error>
fn encoded_len(&self) -> Result<Length, Error>
Compute the length of this value in bytes when encoded as ASN.1 DER.
source§fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
fn encode(&self, writer: &mut impl Writer) -> Result<(), Error>
Encode this value as ASN.1 DER using the provided Writer
.
source§fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], Error>
Encode this value to the provided byte slice, returning a sub-slice
containing the encoded message.