pbc_zk_core

Trait SecretBinary

source
pub trait SecretBinary {
    // Required methods
    fn secret_read_from<T: Read>(reader: &mut T) -> Self;
    fn secret_write_to<T: Write>(&self, writer: &mut T) -> Result<()>;
}
Expand description

Required for secret-shared values. Secret variables are serialized like their public counterparts using the State serialization format.

Required Methods§

source

fn secret_read_from<T: Read>(reader: &mut T) -> Self

Deserialization method for a secret.

source

fn secret_write_to<T: Write>(&self, writer: &mut T) -> Result<()>

Serialization method for a secret.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SecretBinary for i8

Implementation of the SecretBinary trait for i8.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for i16

Implementation of the SecretBinary trait for i16.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for i32

Implementation of the SecretBinary trait for i32.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for i64

Implementation of the SecretBinary trait for i64.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for i128

Implementation of the SecretBinary trait for i128.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for u8

Implementation of the SecretBinary trait for u8.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for u16

Implementation of the SecretBinary trait for u16.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for u32

Implementation of the SecretBinary trait for u32.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for u64

Implementation of the SecretBinary trait for u64.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for u128

Implementation of the SecretBinary trait for u128.

source§

fn secret_read_from<ReadT: Read>(reader: &mut ReadT) -> Self

source§

fn secret_write_to<WriteT: Write>(&self, writer: &mut WriteT) -> Result<()>

source§

impl SecretBinary for Vec<Sbi8>

source§

fn secret_read_from<T: Read>(_reader: &mut T) -> Self

source§

fn secret_write_to<T: Write>(&self, _writer: &mut T) -> Result<()>

source§

impl SecretBinary for Vec<Sbu8>

source§

fn secret_read_from<T: Read>(_reader: &mut T) -> Self

source§

fn secret_write_to<T: Write>(&self, _writer: &mut T) -> Result<()>

source§

impl<const LEN: usize, ElementT: SecretBinary + Sized> SecretBinary for [ElementT; LEN]

Implementation of SecretBinary for arrays of arbitrary sizes and types.

source§

fn secret_read_from<T: Read>(reader: &mut T) -> Self

source§

fn secret_write_to<T: Write>(&self, writer: &mut T) -> Result<()>

Implementors§

source§

impl SecretBinary for Sbi<i8>

Implementation of SecretBinary trait for Sbi<i8>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<i16>

Implementation of SecretBinary trait for Sbi<i16>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<i32>

Implementation of SecretBinary trait for Sbi<i32>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<i64>

Implementation of SecretBinary trait for Sbi<i64>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<i128>

Implementation of SecretBinary trait for Sbi<i128>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<u8>

Implementation of SecretBinary trait for Sbi<u8>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<u16>

Implementation of SecretBinary trait for Sbi<u16>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<u32>

Implementation of SecretBinary trait for Sbi<u32>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<u64>

Implementation of SecretBinary trait for Sbi<u64>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbi<u128>

Implementation of SecretBinary trait for Sbi<u128>. Encoded as a little-endian integer.

source§

impl SecretBinary for Sbu1

Implementation of SecretBinary trait for Sbu1. Uses a full byte to present a single bit.