Struct KeyPair
pub struct KeyPair {
pub input_keypair: InputKeyPair,
pub state_key: StateKey,
pub _deprecated_checksum: Option<Vec<u8>>,
}Expand description
A key pair managed by the key manager.
Fields§
§input_keypair: InputKeyPairInput key pair (pk, sk)
state_key: StateKeyState encryption key
_deprecated_checksum: Option<Vec<u8>>Checksum of the key manager state.
Implementations§
§impl KeyPair
impl KeyPair
pub fn generate_mock() -> KeyPair
pub fn generate_mock() -> KeyPair
Generate a new random key (for testing).
pub fn new(pk: PublicKey, sk: PrivateKey, state_key: StateKey) -> KeyPair
pub fn new(pk: PublicKey, sk: PrivateKey, state_key: StateKey) -> KeyPair
Create a KeyPair.
Trait Implementations§
§impl Decode for KeyPair
impl Decode for KeyPair
§fn try_default() -> Result<KeyPair, DecodeError>
fn try_default() -> Result<KeyPair, DecodeError>
Try to decode from a missing/null/undefined value.
§fn try_from_cbor_value(value: Value) -> Result<KeyPair, DecodeError>
fn try_from_cbor_value(value: Value) -> Result<KeyPair, DecodeError>
Try to decode from a given CBOR value.
§fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a given CBOR value, calling
try_default in case the value is null or
undefined.§impl Encode for KeyPair
impl Encode for KeyPair
§fn into_cbor_value(self) -> Value
fn into_cbor_value(self) -> Value
Encode the type into a CBOR Value.
§impl EncodeAsMap for KeyPair
impl EncodeAsMap for KeyPair
§fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
Encode the type into a CBOR Map.
§fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
Encode the type into a CBOR Map, returning the map items.
Auto Trait Implementations§
impl Freeze for KeyPair
impl RefUnwindSafe for KeyPair
impl Send for KeyPair
impl Sync for KeyPair
impl Unpin for KeyPair
impl UnwindSafe for KeyPair
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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