[−][src]Struct biscuit_auth::format::SerializedBiscuit
Intermediate structure for token serialization
This structure contains the blocks serialized to byte arrays. Those arrays will be used for the signature
Fields
blocks: Vec<Vec<u8>>
keys: Vec<PublicKey>
signature: TokenSignature
Methods
impl SerializedBiscuit
[src]
pub fn from_slice(slice: &[u8]) -> Result<Self, Format>
[src]
pub fn to_proto(&self) -> Biscuit
[src]
serializes the token
pub fn to_vec(&self) -> Result<Vec<u8>, Format>
[src]
serializes the token
pub fn new<T: RngCore + CryptoRng>(
rng: &mut T,
keypair: &KeyPair,
authority: &Block
) -> Result<Self, Format>
[src]
rng: &mut T,
keypair: &KeyPair,
authority: &Block
) -> Result<Self, Format>
creates a new token
pub fn append<T: RngCore + CryptoRng>(
&self,
rng: &mut T,
keypair: &KeyPair,
block: &Block
) -> Result<Self, Format>
[src]
&self,
rng: &mut T,
keypair: &KeyPair,
block: &Block
) -> Result<Self, Format>
adds a new block, serializes it and sign a new token
pub fn verify(&self) -> Result<(), Format>
[src]
checks the signature on a deserialized token
pub fn check_root_key(&self, root: PublicKey) -> Result<(), Format>
[src]
Trait Implementations
impl Clone for SerializedBiscuit
[src]
fn clone(&self) -> SerializedBiscuit
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SerializedBiscuit
[src]
Auto Trait Implementations
impl Send for SerializedBiscuit
impl Sync for SerializedBiscuit
impl Unpin for SerializedBiscuit
impl UnwindSafe for SerializedBiscuit
impl RefUnwindSafe for SerializedBiscuit
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self