pub struct JoseBuilder { /* private fields */ }Expand description
Builder for creating DAG-JOSE signatures
Provides a fluent interface for signing IPLD data with various algorithms.
Implementations§
Source§impl JoseBuilder
impl JoseBuilder
Sourcepub fn with_payload(self, payload: Ipld) -> Self
pub fn with_payload(self, payload: Ipld) -> Self
Set the payload to be signed
Sourcepub fn sign_hs256(self, secret: &[u8]) -> Result<JoseSignature>
pub fn sign_hs256(self, secret: &[u8]) -> Result<JoseSignature>
Sourcepub fn sign_rs256(self, private_key_pem: &[u8]) -> Result<JoseSignature>
pub fn sign_rs256(self, private_key_pem: &[u8]) -> Result<JoseSignature>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JoseBuilder
impl RefUnwindSafe for JoseBuilder
impl Send for JoseBuilder
impl Sync for JoseBuilder
impl Unpin for JoseBuilder
impl UnwindSafe for JoseBuilder
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more