pub struct Es384KeyPair { /* private fields */ }Expand description
In-memory ES384 key material loaded from disk or generated on startup.
Implementations§
Source§impl Es384KeyPair
impl Es384KeyPair
Sourcepub fn new(
paths: Es384KeyPairPaths,
private_key_pem: impl Into<Vec<u8>>,
public_key_pem: impl Into<Vec<u8>>,
) -> Self
pub fn new( paths: Es384KeyPairPaths, private_key_pem: impl Into<Vec<u8>>, public_key_pem: impl Into<Vec<u8>>, ) -> Self
Creates an in-memory key pair from explicit paths and PEM bytes.
Sourcepub fn paths(&self) -> &Es384KeyPairPaths
pub fn paths(&self) -> &Es384KeyPairPaths
Returns the file paths associated with this key pair.
Sourcepub fn private_key_path(&self) -> &Path
pub fn private_key_path(&self) -> &Path
Returns the private key file path.
Sourcepub fn public_key_path(&self) -> &Path
pub fn public_key_path(&self) -> &Path
Returns the public key file path.
Sourcepub fn private_key_pem(&self) -> &[u8] ⓘ
pub fn private_key_pem(&self) -> &[u8] ⓘ
Returns the PEM-encoded private key bytes.
Sourcepub fn public_key_pem(&self) -> &[u8] ⓘ
pub fn public_key_pem(&self) -> &[u8] ⓘ
Returns the PEM-encoded public key bytes.
Sourcepub fn to_jwt_options(&self) -> Result<JsonWebTokenOptions>
pub fn to_jwt_options(&self) -> Result<JsonWebTokenOptions>
Converts the loaded key pair into JWT codec options.
Sourcepub fn to_codec<P>(&self) -> Result<JsonWebToken<P>>
pub fn to_codec<P>(&self) -> Result<JsonWebToken<P>>
Builds a JWT codec directly from this loaded key pair.
Builds a JWT authority directly from this loaded key pair.
Trait Implementations§
Source§impl Clone for Es384KeyPair
impl Clone for Es384KeyPair
Source§fn clone(&self) -> Es384KeyPair
fn clone(&self) -> Es384KeyPair
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Es384KeyPair
impl Debug for Es384KeyPair
Source§impl PartialEq for Es384KeyPair
impl PartialEq for Es384KeyPair
Source§fn eq(&self, other: &Es384KeyPair) -> bool
fn eq(&self, other: &Es384KeyPair) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for Es384KeyPair
impl StructuralPartialEq for Es384KeyPair
Auto Trait Implementations§
impl Freeze for Es384KeyPair
impl RefUnwindSafe for Es384KeyPair
impl Send for Es384KeyPair
impl Sync for Es384KeyPair
impl Unpin for Es384KeyPair
impl UnsafeUnpin for Es384KeyPair
impl UnwindSafe for Es384KeyPair
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