[][src]Trait bbs::ToVariableLengthBytes

pub trait ToVariableLengthBytes {
    type Output;
    type Error;
    fn to_bytes_compressed_form(&self) -> Vec<u8>;
fn from_bytes_compressed_form<I: AsRef<[u8]>>(
        data: I
    ) -> Result<Self::Output, Self::Error>;
fn to_bytes_uncompressed_form(&self) -> Vec<u8>;
fn from_bytes_uncompressed_form<I: AsRef<[u8]>>(
        data: I
    ) -> Result<Self::Output, Self::Error>; }

Trait for structs that have variable length bytes but use compressed Bls12 elements

Associated Types

type Output

The type that implements this trait

type Error

The type of error to return

Loading content...

Required methods

fn to_bytes_compressed_form(&self) -> Vec<u8>

Convert to raw compressed bytes

fn from_bytes_compressed_form<I: AsRef<[u8]>>(
    data: I
) -> Result<Self::Output, Self::Error>

Convert from raw compressed bytes

fn to_bytes_uncompressed_form(&self) -> Vec<u8>

Convert to raw bytes

fn from_bytes_uncompressed_form<I: AsRef<[u8]>>(
    data: I
) -> Result<Self::Output, Self::Error>

Convert from raw bytes

Loading content...

Implementors

impl ToVariableLengthBytes for PublicKey[src]

type Output = PublicKey

type Error = BBSError

impl ToVariableLengthBytes for PoKOfSignatureProof[src]

type Output = PoKOfSignatureProof

type Error = BBSError

fn to_bytes_compressed_form(&self) -> Vec<u8>[src]

Convert the proof to a compressed raw bytes form.

fn from_bytes_compressed_form<I: AsRef<[u8]>>(data: I) -> Result<Self, BBSError>[src]

Convert compressed byte slice into a proof

impl ToVariableLengthBytes for ProofG1[src]

impl ToVariableLengthBytes for BlindSignatureContext[src]

type Output = Self

type Error = BBSError

impl ToVariableLengthBytes for ProofRequest[src]

impl ToVariableLengthBytes for SignatureProof[src]

type Output = SignatureProof

type Error = BBSError

fn to_bytes_compressed_form(&self) -> Vec<u8>[src]

Convert to raw bytes using compressed form for each element.

fn from_bytes_compressed_form<I: AsRef<[u8]>>(data: I) -> Result<Self, BBSError>[src]

Convert from compressed form raw bytes.

Loading content...