Struct secp256k1_zkp::Generator [−][src]
pub struct Generator(_);
Represents a generator on the secp256k1 curve.
A generator is a public key internally but has a slightly different serialization with the first byte being tweaked.
Implementations
impl Generator
[src]
impl Generator
[src]pub fn serialize(&self) -> [u8; 33]
[src]
Serialize the generator to a byte array.
pub fn from_slice(bytes: &[u8]) -> Result<Self, Error>
[src]
Parse a generator from a slice of bytes.
pub fn new_blinded<C: Signing>(
secp: &Secp256k1<C>,
tag: Tag,
blinding_factor: Tweak
) -> Self
[src]
secp: &Secp256k1<C>,
tag: Tag,
blinding_factor: Tweak
) -> Self
Creates a new Generator
by blinding a Tag
using the given blinding factor.
Use Generator::new_unblinded for creating a Generator
with zero blinding factor
pub fn new_unblinded<C: Signing>(secp: &Secp256k1<C>, tag: Tag) -> Self
[src]
Creates a new unblinded Generator
by from Tag
Same as using zero Tweak
with Generator::new_blinded
Trait Implementations
impl<'de> Deserialize<'de> for Generator
[src]
impl<'de> Deserialize<'de> for Generator
[src]fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
[src]
impl StructuralEq for Generator
[src]
impl StructuralEq for Generator
[src]impl StructuralPartialEq for Generator
[src]
impl StructuralPartialEq for Generator
[src]Auto Trait Implementations
impl RefUnwindSafe for Generator
impl RefUnwindSafe for Generator
impl UnwindSafe for Generator
impl UnwindSafe for Generator