Struct coset::CoseKeyBuilder
source · pub struct CoseKeyBuilder(/* private fields */);
Expand description
Builder for CoseKey
objects.
Implementations§
source§impl CoseKeyBuilder
impl CoseKeyBuilder
sourcepub fn new_ec2_pub_key(curve: EllipticCurve, x: Vec<u8>, y: Vec<u8>) -> Self
pub fn new_ec2_pub_key(curve: EllipticCurve, x: Vec<u8>, y: Vec<u8>) -> Self
Constructor for an elliptic curve public key specified by x
and y
coordinates.
sourcepub fn new_ec2_pub_key_y_sign(
curve: EllipticCurve,
x: Vec<u8>,
y_sign: bool
) -> Self
pub fn new_ec2_pub_key_y_sign( curve: EllipticCurve, x: Vec<u8>, y_sign: bool ) -> Self
Constructor for an elliptic curve public key specified by x
coordinate plus sign of y
coordinate.
sourcepub fn new_ec2_priv_key(
curve: EllipticCurve,
x: Vec<u8>,
y: Vec<u8>,
d: Vec<u8>
) -> Self
pub fn new_ec2_priv_key( curve: EllipticCurve, x: Vec<u8>, y: Vec<u8>, d: Vec<u8> ) -> Self
Constructor for an elliptic curve private key specified by d
, together with public x
and
y
coordinates.
sourcepub fn new_symmetric_key(k: Vec<u8>) -> Self
pub fn new_symmetric_key(k: Vec<u8>) -> Self
Constructor for a symmetric key specified by k
.
sourcepub fn new_okp_key() -> Self
pub fn new_okp_key() -> Self
Constructor for a octet keypair key.
sourcepub fn add_key_op(self, op: KeyOperation) -> Self
pub fn add_key_op(self, op: KeyOperation) -> Self
Add a key operation.
Trait Implementations§
source§impl Debug for CoseKeyBuilder
impl Debug for CoseKeyBuilder
source§impl Default for CoseKeyBuilder
impl Default for CoseKeyBuilder
source§fn default() -> CoseKeyBuilder
fn default() -> CoseKeyBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CoseKeyBuilder
impl RefUnwindSafe for CoseKeyBuilder
impl Send for CoseKeyBuilder
impl Sync for CoseKeyBuilder
impl Unpin for CoseKeyBuilder
impl UnwindSafe for CoseKeyBuilder
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