pub struct ProxySecretKey {
pub omega: u64,
pub issuer_pk: PublicKey<Ed25519Bip32>,
pub delegate_pk: PublicKey<Ed25519Bip32>,
pub cert: Signature<(), Ed25519Bip32>,
}
Fields
omega: u64
issuer_pk: PublicKey<Ed25519Bip32>
delegate_pk: PublicKey<Ed25519Bip32>
cert: Signature<(), Ed25519Bip32>
Implementations
sourceimpl ProxySecretKey
impl ProxySecretKey
sourcepub fn verify(&self, protocol_magic: ProtocolMagic) -> bool
pub fn verify(&self, protocol_magic: ProtocolMagic) -> bool
Verify that ‘cert’ is a signature from ‘issuer_pk’ over ‘delegate_pk’ and ‘omega’.
sourcepub fn sign(
issuer_prv: &SecretKey<Ed25519Bip32>,
delegate_pk: PublicKey<Ed25519Bip32>,
omega: u64,
protocol_magic: ProtocolMagic
) -> Self
pub fn sign(
issuer_prv: &SecretKey<Ed25519Bip32>,
delegate_pk: PublicKey<Ed25519Bip32>,
omega: u64,
protocol_magic: ProtocolMagic
) -> Self
Use ‘issuer_prv’ to sign ‘delegate_pk’ and ‘omega’ to create a ProxySecretKey.
Trait Implementations
sourceimpl Clone for ProxySecretKey
impl Clone for ProxySecretKey
sourcefn clone(&self) -> ProxySecretKey
fn clone(&self) -> ProxySecretKey
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ProxySecretKey
impl Debug for ProxySecretKey
sourceimpl Deserialize for ProxySecretKey
impl Deserialize for ProxySecretKey
sourcefn deserialize<R: BufRead>(raw: &mut Deserializer<R>) -> Result<Self>
fn deserialize<R: BufRead>(raw: &mut Deserializer<R>) -> Result<Self>
method to implement to deserialise an object from the given
Deserializer
. Read more
sourceimpl Serialize for ProxySecretKey
impl Serialize for ProxySecretKey
fn serialize<'se, W: Write>(
&self,
serializer: &'se mut Serializer<W>
) -> Result<&'se mut Serializer<W>>
Auto Trait Implementations
impl RefUnwindSafe for ProxySecretKey
impl Send for ProxySecretKey
impl Sync for ProxySecretKey
impl Unpin for ProxySecretKey
impl UnwindSafe for ProxySecretKey
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Deserialize for T where
T: Deserialize,
impl<T> Deserialize for T where
T: Deserialize,
fn deserialize<R>(raw: &mut Deserializer<R>) -> Result<T, DeserializeError> where
R: BufRead + Seek,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more