RustCrypto

Struct RustCrypto 

Source
pub struct RustCrypto;
Expand description

Use this together with yTLS by providing this struct into the client or server contextes.

Implementations§

Source§

impl RustCrypto

Source

pub fn init() -> Self

Trait Implementations§

Source§

impl Clone for RustCrypto

Source§

fn clone(&self) -> RustCrypto

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CryptoConfig for RustCrypto

Source§

type PrkError = InvalidPrkLength

Source§

type Hasher = Sha256Hasher

Source§

type X25519 = X25519

Source§

fn ecdhe_x25519<R: CryptoRng>(rng: &mut R) -> Self::X25519

Provide the concrete ECDHE providing the X25519
Source§

fn hasher_sha256() -> Self::Hasher

Provide the concrete hasher containing SHA256 hasher
Source§

fn sign_p256_init(key: &[u8]) -> Option<impl CryptoSignerP256Processor>

ECDSA secp256p1 Signature processor
Source§

fn aead_chaha20poly1305(key: &[u8; 32]) -> impl CryptoChaCha20Poly1305Processor

AEAD ChaCha20Poly1305 with Key and Nonce / IV
Source§

fn hkdf_sha256_from_prk( prk: &[u8], ) -> Result<impl CryptoSha256HkdfGenProcessor, Self::PrkError>

Hkdf256 Sha256 from strong pre-existing prk
Source§

fn hkdf_sha256_init() -> impl CryptoSha256HkdfExtractProcessor

Provide the configured Hkdf Sha256 impl
Source§

fn hmac_sha384_init_with_key(key: &[u8; 48]) -> impl CryptoSha384HmacProcessor

Provide the configured Hmac Sha384 impl
Source§

fn hmac_sha256_init_with_key(key: &[u8; 32]) -> impl CryptoSha256HmacProcessor

Provide the configured Hmac Sha256 impl
Source§

fn sha256_init() -> impl CryptoSha256TranscriptProcessor

Provide the configured SHA256 Hasher impl
Source§

fn sha384_init() -> impl CryptoSha384TranscriptProcessor

Provide the configured SHA384 Hasher impl
Source§

fn x25519_init<R: CryptoRng>( &mut self, rng: &mut R, ) -> impl CryptoX25519Processor

Provide the configured Ephemeral X25519 impl
Source§

impl Copy for RustCrypto

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.