pub struct COSESign1 { /* private fields */ }Implementations§
Source§impl COSESign1
impl COSESign1
pub fn headers(&self) -> Headers
pub fn payload(&self) -> Option<Vec<u8>>
pub fn signature(&self) -> Vec<u8> ⓘ
Sourcepub fn signed_data(
&self,
external_aad: Option<Vec<u8>>,
external_payload: Option<Vec<u8>>,
) -> Result<SigStructure, JsError>
pub fn signed_data( &self, external_aad: Option<Vec<u8>>, external_payload: Option<Vec<u8>>, ) -> Result<SigStructure, JsError>
For verifying, we will want to reverse-construct this SigStructure to check the signature against
§Arguments
external_aad- External application data - see RFC 8152 section 4.3. Set to None if not using this.
pub fn new( headers: &Headers, payload: Option<Vec<u8>>, signature: Vec<u8>, ) -> Self
Trait Implementations§
Source§impl Deserialize for COSESign1
impl Deserialize for COSESign1
fn deserialize<R: BufRead + Seek>( raw: &mut Deserializer<R>, ) -> Result<Self, DeserializeError>
Source§impl FromBytes for COSESign1
impl FromBytes for COSESign1
fn from_bytes(bytes: Vec<u8>) -> Result<COSESign1, DeserializeError>
Auto Trait Implementations§
impl Freeze for COSESign1
impl RefUnwindSafe for COSESign1
impl Send for COSESign1
impl Sync for COSESign1
impl Unpin for COSESign1
impl UnwindSafe for COSESign1
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