#[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 Freeze for cose_key
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 24 bytes