Struct dharitri_wasm_node::api::ArwenEllipticCurve
source · pub struct ArwenEllipticCurve {
pub handle: i32,
}Fields§
§handle: i32Trait Implementations§
source§impl EllipticCurveApi for ArwenEllipticCurve
impl EllipticCurveApi for ArwenEllipticCurve
type BigUint = ArwenBigUint
fn get_values( &self ) -> (Self::BigUint, Self::BigUint, Self::BigUint, Self::BigUint, Self::BigUint, u32)
fn create_ec(curve: &str) -> Self
fn get_ec_length(&self) -> u32
fn get_priv_key_byte_length(&self) -> u32
fn add_ec( &self, x_first_point: Self::BigUint, y_first_point: Self::BigUint, x_second_point: Self::BigUint, y_second_point: Self::BigUint ) -> (Self::BigUint, Self::BigUint)
fn double_ec( &self, x_point: Self::BigUint, y_point: Self::BigUint ) -> (Self::BigUint, Self::BigUint)
fn is_on_curve_ec(&self, x_point: Self::BigUint, y_point: Self::BigUint) -> bool
fn scalar_mult( &self, x_point: Self::BigUint, y_point: Self::BigUint, data: BoxedBytes ) -> (Self::BigUint, Self::BigUint)
fn scalar_base_mult(&self, data: BoxedBytes) -> (Self::BigUint, Self::BigUint)
fn marshal_ec(&self, x_pair: Self::BigUint, y_pair: Self::BigUint) -> BoxedBytes
fn marshal_compressed_ec( &self, x_pair: Self::BigUint, y_pair: Self::BigUint ) -> BoxedBytes
fn unmarshal_ec(&self, data: BoxedBytes) -> (Self::BigUint, Self::BigUint)
fn unmarshal_compressed_ec( &self, data: BoxedBytes ) -> (Self::BigUint, Self::BigUint)
fn generate_key_ec(&self) -> (Self::BigUint, Self::BigUint, BoxedBytes)
fn from_bitsize_ec(bitsize: u32) -> Option<Self>
source§impl NestedEncode for ArwenEllipticCurve
impl NestedEncode for ArwenEllipticCurve
source§fn dep_encode<O: NestedEncodeOutput>(
&self,
dest: &mut O
) -> Result<(), EncodeError>
fn dep_encode<O: NestedEncodeOutput>( &self, dest: &mut O ) -> Result<(), EncodeError>
NestedEncode to output, using the format of an object nested inside another structure.
Does not provide compact version.
source§fn dep_encode_or_exit<O: NestedEncodeOutput, ExitCtx: Clone>(
&self,
dest: &mut O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)
fn dep_encode_or_exit<O: NestedEncodeOutput, ExitCtx: Clone>( &self, dest: &mut O, c: ExitCtx, exit: fn(_: ExitCtx, _: EncodeError) -> ! )
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller implementations
in cases where the application is supposed to exit directly on decode error.source§impl TopEncode for ArwenEllipticCurve
impl TopEncode for ArwenEllipticCurve
source§fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
fn top_encode<O: TopEncodeOutput>(&self, output: O) -> Result<(), EncodeError>
Attempt to serialize the value to ouput.
source§fn top_encode_or_exit<O: TopEncodeOutput, ExitCtx: Clone>(
&self,
output: O,
c: ExitCtx,
exit: fn(_: ExitCtx, _: EncodeError) -> !
)
fn top_encode_or_exit<O: TopEncodeOutput, ExitCtx: Clone>( &self, output: O, c: ExitCtx, exit: fn(_: ExitCtx, _: EncodeError) -> ! )
Version of
top_decode that exits quickly in case of error.
Its purpose is to create smaller bytecode implementations
in cases where the application is supposed to exit directly on decode error.source§impl TypeAbi for ArwenEllipticCurve
impl TypeAbi for ArwenEllipticCurve
fn type_name() -> String
source§fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
fn provide_type_descriptions<TDC>(accumulator: &mut TDC)where
TDC: TypeDescriptionContainer,
A type can provide more than its own description.
For instance, a struct can also provide the descriptions of the type of its fields.
TypeAbi doesn’t care for the exact accumulator type,
which is abstracted by the TypeDescriptionContainer trait.
Auto Trait Implementations§
impl RefUnwindSafe for ArwenEllipticCurve
impl Send for ArwenEllipticCurve
impl Sync for ArwenEllipticCurve
impl Unpin for ArwenEllipticCurve
impl UnwindSafe for ArwenEllipticCurve
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