[−][src]Struct ursa::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.
Methods
impl Generator
[src]
pub fn new() -> UrsaCryptoResult<Generator>
[src]
Creates and returns random generator point that satisfies BLS algorithm requirements.
Example
use ursa::bls::Generator; Generator::new().unwrap();
pub fn as_bytes(&self) -> &[u8]
[src]
Returns BLS generator point bytes representation.
Example
use ursa::bls::*; let gen = Generator::new().unwrap(); let gen_bytes = gen.as_bytes(); assert!(gen_bytes.len() > 0);
pub fn from_bytes(bytes: &[u8]) -> UrsaCryptoResult<Generator>
[src]
Creates and returns generator point from bytes representation.
Example
use ursa::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 Serialize for Generator
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Generator
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for Generator
impl Unpin for Generator
impl Sync for Generator
impl UnwindSafe for Generator
impl RefUnwindSafe for Generator
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,