pub struct SigningKey {
pub scheme: SigningScheme,
/* private fields */
}Expand description
The Objects signing key stored internally in the kernel used during the signing of capabilities.
Fields§
§scheme: SigningSchemeImplementations§
Source§impl SigningKey
impl SigningKey
Sourcepub fn new_keypair(
scheme: &SigningScheme,
obj_create_spec: ObjectCreate,
) -> Result<(Object<Self>, Object<VerifyingKey>), TwzError>
pub fn new_keypair( scheme: &SigningScheme, obj_create_spec: ObjectCreate, ) -> Result<(Object<Self>, Object<VerifyingKey>), TwzError>
Creates a new SigningKey / VerifyingKey object pairs.
Sourcepub fn from_slice(
slice: &[u8],
scheme: SigningScheme,
) -> Result<Self, SecurityError>
pub fn from_slice( slice: &[u8], scheme: SigningScheme, ) -> Result<Self, SecurityError>
Builds up a signing key from a slice of bytes and a specified signing scheme.
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn sign(&self, msg: &[u8]) -> Result<Signature, SecurityError>
Trait Implementations§
Source§impl BaseType for SigningKey
impl BaseType for SigningKey
Source§fn fingerprint() -> u64
fn fingerprint() -> u64
The fingerprint of this type.
Source§impl Clone for SigningKey
impl Clone for SigningKey
Source§fn clone(&self) -> SigningKey
fn clone(&self) -> SigningKey
Returns a copy 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 Debug for SigningKey
impl Debug for SigningKey
Source§impl From<SigningKey<NistP256>> for SigningKey
impl From<SigningKey<NistP256>> for SigningKey
Source§impl PartialEq for SigningKey
impl PartialEq for SigningKey
Source§impl TryFrom<&SigningKey> for SigningKey
impl TryFrom<&SigningKey> for SigningKey
Source§type Error = SecurityError
type Error = SecurityError
The type returned in the event of a conversion error.
impl Copy for SigningKey
impl Eq for SigningKey
impl StructuralPartialEq for SigningKey
Auto Trait Implementations§
impl Freeze for SigningKey
impl ObjSafe for SigningKey
impl RefUnwindSafe for SigningKey
impl Send for SigningKey
impl StoreCopy for SigningKey
impl Sync for SigningKey
impl Unpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.