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 duplicate 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<'_>
Available on crate feature pem
only.
impl PemLabel for RsaPublicKey<'_>
Available on crate feature
pem
only.Source§impl<'a> TryFrom<&'a [u8]> for RsaPublicKey<'a>
impl<'a> TryFrom<&'a [u8]> for RsaPublicKey<'a>
Source§impl TryFrom<&RsaPublicKey<'_>> for Document
Available on crate feature alloc
only.
impl TryFrom<&RsaPublicKey<'_>> for Document
Available on crate feature
alloc
only.Source§impl TryFrom<RsaPublicKey<'_>> for Document
Available on crate feature alloc
only.
impl TryFrom<RsaPublicKey<'_>> for Document
Available on crate feature
alloc
only.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§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.
impl<T> DecodeOwned for Twhere
T: for<'a> Decode<'a>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes