Struct elliptic_curve::ScalarBytes [−][src]
pub struct ScalarBytes<C: Curve> { /* fields omitted */ }
Expand description
Scalar bytes: wrapper for FieldBytes
which guarantees that the the
inner byte value is within range of the Curve::ORDER
.
Does not require an arithmetic implementation.
Implementations
Create new ScalarBytes
, checking that the given input is within
range of the Curve::ORDER
.
Create ScalarBytes
from the provided C::UInt
.
This is supported on crate feature arithmetic
only.
arithmetic
only.Convert from a Scalar
type for this curve.
This is supported on crate feature arithmetic
only.
arithmetic
only.Convert to a Scalar
type for this curve.
This is supported on crate feature arithmetic
only.
arithmetic
only.Convert into a Scalar
type for this curve.
Borrow the inner FieldBytes
Convert into FieldBytes
Create ScalarBytes
representing a value of zero.
Is this ScalarBytes
value all zeroes?
Trait Implementations
impl<C> AsRef<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> for ScalarBytes<C> where
C: Curve,
impl<C> AsRef<GenericArray<u8, <<C as Curve>::UInt as ArrayEncoding>::ByteSize>> for ScalarBytes<C> where
C: Curve,
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<C> RefUnwindSafe for ScalarBytes<C> where
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<C> Send for ScalarBytes<C>
impl<C> Sync for ScalarBytes<C>
impl<C> Unpin for ScalarBytes<C> where
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<C> UnwindSafe for ScalarBytes<C> where
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self