[−][src]Struct wedpr_indy_crypto::bls::Generator
BLS generator point. BLS algorithm requires choosing of generator point that must be known to all parties. The most of BLS methods require generator to be provided.
Implementations
impl Generator
[src]
pub fn new() -> Result<Generator, IndyCryptoError>
[src]
Creates and returns random generator point that satisfies BLS algorithm requirements.
Example
use indy_crypto::bls::Generator; Generator::new().unwrap();
pub fn as_bytes(&self) -> &[u8]
[src]
Returns BLS generator point bytes representation.
Example
use indy_crypto::bls::*; let gen = Generator::new().unwrap(); let gen_bytes = gen.as_bytes(); assert!(gen_bytes.len() > 0);
pub fn from_bytes(bytes: &[u8]) -> Result<Generator, IndyCryptoError>
[src]
Creates and returns generator point from bytes representation.
Example
use indy_crypto::bls::Generator; let gen = Generator::new().unwrap(); let gen_bytes = gen.as_bytes(); Generator::from_bytes(gen_bytes).unwrap();
Trait Implementations
impl Debug for Generator
[src]
impl<'de> Deserialize<'de> for Generator
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for Generator
[src]
Auto Trait Implementations
impl RefUnwindSafe for Generator
[src]
impl Send for Generator
[src]
impl Sync for Generator
[src]
impl Unpin for Generator
[src]
impl UnwindSafe for Generator
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,