pub struct SigningKey(/* private fields */);Expand description
A private signing key (a bot’s, or a team owner’s).
Implementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn generate() -> Result<(Self, Vec<u8>), Error>
pub fn generate() -> Result<(Self, Vec<u8>), Error>
A new random key and its PKCS#8 bytes (what is saved).
Sourcepub fn from_pkcs8(bytes: &[u8]) -> Result<Self, Error>
pub fn from_pkcs8(bytes: &[u8]) -> Result<Self, Error>
A key from PKCS#8 bytes.
Sourcepub fn load_or_create(path: &Path) -> Result<Self, Error>
pub fn load_or_create(path: &Path) -> Result<Self, Error>
Reads the key at path, or creates it (mode 0600) when there is none.
Trait Implementations§
Source§impl Clone for SigningKey
impl Clone for SigningKey
Auto Trait Implementations§
impl Freeze for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl Sync for SigningKey
impl Unpin for SigningKey
impl UnsafeUnpin for SigningKey
impl UnwindSafe for SigningKey
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