Skip to main content

NtorServerKeys

Trait NtorServerKeys 

Source
pub(crate) trait NtorServerKeys {
    // Required methods
    fn ident(&self) -> &RsaIdentity;
    fn public_key(&self) -> &PublicKey;
    fn secret_key(&self) -> &StaticSecret;

    // Provided method
    fn matches_pk(&self, pk: &PublicKey) -> Choice { ... }
}
Expand description

An object holding the keys necessary for a server-side ntor handshake.

Required Methods§

Source

fn ident(&self) -> &RsaIdentity

The server’s identity.

Source

fn public_key(&self) -> &PublicKey

The server’s public key.

Source

fn secret_key(&self) -> &StaticSecret

The server’s secret key.

Provided Methods§

Source

fn matches_pk(&self, pk: &PublicKey) -> Choice

Return true if the curve25519 public key in self matches pk.

Used for looking up keys in an array.

This should not be implemented manually.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§