Struct btlib::crypto::ConcreteCreds

source ·
pub struct ConcreteCreds { /* private fields */ }

Implementations§

Trait Implementations§

source§

impl Clone for ConcreteCreds

source§

fn clone(&self) -> ConcreteCreds

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CredsPriv for ConcreteCreds

source§

fn writecap(&self) -> Option<&Writecap>

Returns a reference to the writecap associated with these credentials, if one has been issued.
source§

fn sign_kind(&self) -> Sign

source§

fn bind_path(&self) -> Result<BlockPath>

Returns the path these credentials are authorized to bind to according, as specified by their Writecap. If these creds haven’t been issued a Writecap, then an Err variant containing BlockError::MissingWritecap is returned.
source§

impl CredsPub for ConcreteCreds

source§

fn public_sign(&self) -> &AsymKey<Public, Sign>

Returns a reference to the public signing key which can be used to verify signatures.
source§

fn concrete_pub(&self) -> ConcretePub

source§

fn sign_kind(&self) -> Sign

source§

impl Decrypter for ConcreteCreds

source§

fn decrypt(&self, slice: &[u8]) -> Result<Vec<u8>>

source§

impl<'de> Deserialize<'de> for ConcreteCreds

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Encrypter for ConcreteCreds

source§

fn encrypt(&self, slice: &[u8]) -> Result<Vec<u8>>

source§

impl Principaled for ConcreteCreds

source§

fn principal_of_kind(&self, kind: HashKind) -> Principal

Returns the Principal that owns self, using the given hash algorithm.
source§

fn principal(&self) -> Principal

Returns the Principal that owns self, using the default hash algorithm.
source§

impl Serialize for ConcreteCreds

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Signer for ConcreteCreds

source§

fn init_sign(&self) -> Result<Box<dyn SignOp + '_>>

Starts a new signing operation and returns the struct representing it.
source§

fn sign(&self, parts: &mut dyn Iterator<Item = &[u8]>) -> Result<Signature>

Returns a signature over the given parts. It’s critical that subsequent invocations of this method on the same instance return a Signature with data fields of the same length.
source§

fn kind(&self) -> Sign

source§

fn sign_writecap(&self, writecap: &mut Writecap) -> Result<()>

source§

impl Verifier for ConcreteCreds

source§

fn init_verify(&self) -> Result<Box<dyn VerifyOp + '_>>

source§

fn verify( &self, parts: &mut dyn Iterator<Item = &[u8]>, signature: &[u8] ) -> Result<()>

source§

fn kind(&self) -> Sign

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<C> Creds for Cwhere C: CredsPriv + CredsPub + Send + Sync + ?Sized,

source§

fn issue_writecap( &self, issued_to: Principal, path_components: &mut dyn Iterator<Item = &str>, expires: Epoch ) -> Result<Writecap>

source§

fn pub_sign_kind(&self) -> Sign

source§

fn priv_sign_kind(&self) -> Sign

source§

impl<T> DecrypterExt for Twhere T: Decrypter + ?Sized,

source§

impl<T> EncrypterExt for Twhere T: Encrypter + ?Sized,

source§

fn ser_encrypt<T: Serialize>(&self, value: &T) -> Result<Ciphertext<T>>

Serializes the given value into a new vector, then encrypts it and returns the resulting ciphertext.
§

impl<T> Free for T

§

unsafe default fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> SignerExt for Twhere T: Signer + ?Sized,

source§

fn ser_sign<T: Serialize>(&self, value: &T) -> Result<Signed<T>>

source§

fn ser_sign_into<T: Serialize>( &self, value: &T, buf: &mut Vec<u8> ) -> Result<Signature>

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V> VerifierExt for Vwhere V: Verifier + ?Sized,

source§

fn ser_verify<T>(&self, value: &T, signature: &[u8]) -> Result<(), Error>where T: Serialize,

source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,