Struct solana_zk_token_sdk::encryption::elgamal::ElGamalPubkey
source · [−]pub struct ElGamalPubkey(_);
Expand description
Public key for the ElGamal encryption scheme.
Implementations
Derive the ElGamalPubkey
that uniquely corresponds to an ElGamalSecretKey
Utility method for code ergonomics.
pub fn encrypt_with<T: Into<Scalar>>(
&self,
msg: T,
open: &PedersenOpening
) -> ElGamalCiphertext
pub fn encrypt_with<T: Into<Scalar>>(
&self,
msg: T,
open: &PedersenOpening
) -> ElGamalCiphertext
Utility method for code ergonomics.
Generate a decryption token from an ElGamal public key and a Pedersen opening.
Trait Implementations
Returns the “default value” for a type. Read more
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
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ElGamalPubkey
impl Send for ElGamalPubkey
impl Sync for ElGamalPubkey
impl Unpin for ElGamalPubkey
impl UnwindSafe for ElGamalPubkey
Blanket Implementations
pub default fn visit_for_abi(
&self,
digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn visit_for_abi(
&self,
_digester: &mut AbiDigester
) -> Result<AbiDigester, DigestError>
pub default fn example() -> T
Mutably borrows from an owned value. Read more