pub struct EcPrivateKey {
pub scalar_be: [u8; 32],
pub public: Option<ProjectivePoint>,
}Expand description
Decoded SEC1 ECPrivateKey contents.
Returned by decode; consumers translate the validated scalar
into an crate::sm2::Sm2PrivateKey via the constructor on that
type. Holds public bytes only — no Mont-form scalars.
Fields§
§scalar_be: [u8; 32]32-byte big-endian scalar d. Not validated against the
curve order here — the caller must reject d == 0 and
d == n-1 via crate::sm2::Sm2PrivateKey::from_bytes_be.
public: Option<ProjectivePoint>Decoded uncompressed public point, if the optional
publicKey field was present and well-formed.
Trait Implementations§
Source§impl Clone for EcPrivateKey
impl Clone for EcPrivateKey
Source§fn clone(&self) -> EcPrivateKey
fn clone(&self) -> EcPrivateKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EcPrivateKey
impl Debug for EcPrivateKey
Source§impl Drop for EcPrivateKey
impl Drop for EcPrivateKey
Auto Trait Implementations§
impl Freeze for EcPrivateKey
impl RefUnwindSafe for EcPrivateKey
impl Send for EcPrivateKey
impl Sync for EcPrivateKey
impl Unpin for EcPrivateKey
impl UnsafeUnpin for EcPrivateKey
impl UnwindSafe for EcPrivateKey
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