pub struct CoseKey {Show 23 fields
pub bytes: Vec<u8>,
pub kty: Option<i32>,
pub base_iv: Option<Vec<u8>>,
pub key_ops: Vec<i32>,
pub alg: Option<i32>,
pub x: Option<Vec<u8>>,
pub y: Option<Vec<u8>>,
pub d: Option<Vec<u8>>,
pub k: Option<Vec<u8>>,
pub kid: Option<Vec<u8>>,
pub crv: Option<i32>,
pub n: Option<Vec<u8>>,
pub e: Option<Vec<u8>>,
pub rsa_d: Option<Vec<u8>>,
pub p: Option<Vec<u8>>,
pub q: Option<Vec<u8>>,
pub dp: Option<Vec<u8>>,
pub dq: Option<Vec<u8>>,
pub qinv: Option<Vec<u8>>,
pub other: Option<Vec<Vec<u8>>>,
pub ri: Option<Vec<u8>>,
pub di: Option<Vec<u8>>,
pub ti: Option<Vec<u8>>,
/* private fields */
}
Expand description
cose-key structure.
Fields§
§bytes: Vec<u8>
cose-key encoded bytes.
kty: Option<i32>
Key Type.
base_iv: Option<Vec<u8>>
Base Initialization Vector.
key_ops: Vec<i32>
List of Key Operations.
alg: Option<i32>
COSE Algorithm.
x: Option<Vec<u8>>
Public Key X parameter for OKP/EC2 Keys.
y: Option<Vec<u8>>
Public Key Y parameter for EC2 Keys.
d: Option<Vec<u8>>
Private Key D parameter for OKP/EC2 Keys.
k: Option<Vec<u8>>
Key value for Symmetric Keys.
kid: Option<Vec<u8>>
Key ID.
crv: Option<i32>
COSE curve for OKP/EC2 keys.
n: Option<Vec<u8>>
§e: Option<Vec<u8>>
§rsa_d: Option<Vec<u8>>
§p: Option<Vec<u8>>
§q: Option<Vec<u8>>
§dp: Option<Vec<u8>>
§dq: Option<Vec<u8>>
§qinv: Option<Vec<u8>>
§other: Option<Vec<Vec<u8>>>
§ri: Option<Vec<u8>>
§di: Option<Vec<u8>>
§ti: Option<Vec<u8>>
Implementations§
Source§impl CoseKey
impl CoseKey
pub fn n(&mut self, n: Vec<u8>)
pub fn e(&mut self, e: Vec<u8>)
pub fn rsa_d(&mut self, rsa_d: Vec<u8>)
pub fn p(&mut self, p: Vec<u8>)
pub fn q(&mut self, q: Vec<u8>)
pub fn dp(&mut self, dp: Vec<u8>)
pub fn dq(&mut self, dq: Vec<u8>)
pub fn qinv(&mut self, qinv: Vec<u8>)
pub fn other(&mut self, other: Vec<Vec<u8>>)
pub fn ri(&mut self, ri: Vec<u8>)
pub fn di(&mut self, di: Vec<u8>)
pub fn ti(&mut self, ti: Vec<u8>)
Sourcepub fn encode(&mut self) -> CoseResult
pub fn encode(&mut self) -> CoseResult
Method to encode the cose-Key.
Sourcepub fn decode(&mut self) -> CoseResult
pub fn decode(&mut self) -> CoseResult
Method to decode a cose-Key.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CoseKey
impl RefUnwindSafe for CoseKey
impl Send for CoseKey
impl Sync for CoseKey
impl Unpin for CoseKey
impl UnwindSafe for CoseKey
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