Struct safe_zk_token_sdk::encryption::pedersen::PedersenCommitment
source · pub struct PedersenCommitment(_);
Expand description
Pedersen commitment type.
Implementations§
source§impl PedersenCommitment
impl PedersenCommitment
pub fn get_point(&self) -> &RistrettoPoint
pub fn to_bytes(&self) -> [u8; 32]
pub fn from_bytes(bytes: &[u8]) -> Option<PedersenCommitment>
Trait Implementations§
source§impl<'a, 'b> Add<&'b PedersenCommitment> for &'a PedersenCommitment
impl<'a, 'b> Add<&'b PedersenCommitment> for &'a PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.source§fn add(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
fn add(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moresource§impl<'b> Add<&'b PedersenCommitment> for PedersenCommitment
impl<'b> Add<&'b PedersenCommitment> for PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.source§fn add(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
fn add(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moresource§impl<'a> Add<PedersenCommitment> for &'a PedersenCommitment
impl<'a> Add<PedersenCommitment> for &'a PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.source§fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moresource§impl Add<PedersenCommitment> for PedersenCommitment
impl Add<PedersenCommitment> for PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
+
operator.source§fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
fn add(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
+
operation. Read moresource§impl Clone for PedersenCommitment
impl Clone for PedersenCommitment
source§fn clone(&self) -> PedersenCommitment
fn clone(&self) -> PedersenCommitment
Returns a copy of the value. Read more
1.0.0 · 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 PedersenCommitment
impl Debug for PedersenCommitment
source§impl Default for PedersenCommitment
impl Default for PedersenCommitment
source§fn default() -> PedersenCommitment
fn default() -> PedersenCommitment
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PedersenCommitment
impl<'de> Deserialize<'de> for PedersenCommitment
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<PedersenCommitment> for PedersenCommitment
impl From<PedersenCommitment> for PedersenCommitment
source§fn from(comm: PedersenCommitment) -> Self
fn from(comm: PedersenCommitment) -> Self
Converts to this type from the input type.
source§impl<'a, 'b> Mul<&'b PedersenCommitment> for &'a Scalar
impl<'a, 'b> Mul<&'b PedersenCommitment> for &'a Scalar
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§fn mul(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
fn mul(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moresource§impl<'b> Mul<&'b PedersenCommitment> for Scalar
impl<'b> Mul<&'b PedersenCommitment> for Scalar
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§fn mul(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
fn mul(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moresource§impl<'a, 'b> Mul<&'b Scalar> for &'a PedersenCommitment
impl<'a, 'b> Mul<&'b Scalar> for &'a PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§impl<'b> Mul<&'b Scalar> for PedersenCommitment
impl<'b> Mul<&'b Scalar> for PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§impl<'a> Mul<PedersenCommitment> for &'a Scalar
impl<'a> Mul<PedersenCommitment> for &'a Scalar
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moresource§impl Mul<PedersenCommitment> for Scalar
impl Mul<PedersenCommitment> for Scalar
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
fn mul(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
*
operation. Read moresource§impl<'a> Mul<Scalar> for &'a PedersenCommitment
impl<'a> Mul<Scalar> for &'a PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§impl Mul<Scalar> for PedersenCommitment
impl Mul<Scalar> for PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
*
operator.source§impl PartialEq<PedersenCommitment> for PedersenCommitment
impl PartialEq<PedersenCommitment> for PedersenCommitment
source§fn eq(&self, other: &PedersenCommitment) -> bool
fn eq(&self, other: &PedersenCommitment) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PedersenCommitment
impl Serialize for PedersenCommitment
source§impl<'a, 'b> Sub<&'b PedersenCommitment> for &'a PedersenCommitment
impl<'a, 'b> Sub<&'b PedersenCommitment> for &'a PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.source§fn sub(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
fn sub(self, commitment: &'b PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moresource§impl<'b> Sub<&'b PedersenCommitment> for PedersenCommitment
impl<'b> Sub<&'b PedersenCommitment> for PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.source§fn sub(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
fn sub(self, rhs: &'b PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moresource§impl<'a> Sub<PedersenCommitment> for &'a PedersenCommitment
impl<'a> Sub<PedersenCommitment> for &'a PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.source§fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moresource§impl Sub<PedersenCommitment> for PedersenCommitment
impl Sub<PedersenCommitment> for PedersenCommitment
§type Output = PedersenCommitment
type Output = PedersenCommitment
The resulting type after applying the
-
operator.source§fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
fn sub(self, rhs: PedersenCommitment) -> PedersenCommitment
Performs the
-
operation. Read moresource§impl TryFrom<PedersenCommitment> for PedersenCommitment
impl TryFrom<PedersenCommitment> for PedersenCommitment
§type Error = ProofError
type Error = ProofError
The type returned in the event of a conversion error.