#[repr(C)]pub struct cose_key {
pub kty: cose_kty_t,
pub algo: cose_algo_t,
pub crv: cose_curve_t,
pub kid: *mut u8,
pub kid_len: size_t,
pub x: *mut u8,
pub y: *mut u8,
pub d: *mut u8,
}
Expand description
@name COSE key object
For signing, only the d parameter is required and the x and y coordinates can be set to NULL. For verification the d part can be set to NULL. For Eddsa, the y part is not used and must be NULL.
@{
Fields§
§kty: cose_kty_t
< Key type
algo: cose_algo_t
< Key algorithm restriction with this key
crv: cose_curve_t
< Curve, algo is derived from this for now
kid: *mut u8
< Key identifier
kid_len: size_t
< length of the key identifier
x: *mut u8
< Public key part 1, must match the expected size of the algorithm
y: *mut u8
< Public key part 2, when not NULL, must match the expected size of the algorithm
d: *mut u8
< Private or secret key, must match the expected size of the algorithm
Trait Implementations§
impl Copy for cose_key
Auto Trait Implementations§
impl RefUnwindSafe for cose_key
impl !Send for cose_key
impl !Sync for cose_key
impl Unpin for cose_key
impl UnwindSafe for cose_key
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