[][src]Struct poseidon252::encrypt::EncryptedData

pub struct EncryptedData { /* fields omitted */ }

Encapsulates an encrypted data

Implementations

impl EncryptedData[src]

pub fn encrypt(
    message: &BlsScalar,
    secret: &BlsScalar,
    nonce: &BlsScalar
) -> Self
[src]

Perform the encryption of a given message provided a secret and a nonce

pub fn decrypt(
    &self,
    secret: &BlsScalar,
    nonce: &BlsScalar
) -> Option<BlsScalar>
[src]

Decrypt a previously encrypted message, provided the shared secret and nonce used for encryption. If the decryption is not successful, None is returned

Trait Implementations

impl Clone for EncryptedData[src]

impl Copy for EncryptedData[src]

impl Debug for EncryptedData[src]

impl Eq for EncryptedData[src]

impl PartialEq<EncryptedData> for EncryptedData[src]

impl Read for EncryptedData[src]

impl StructuralEq for EncryptedData[src]

impl StructuralPartialEq for EncryptedData[src]

impl Write for EncryptedData[src]

Auto Trait Implementations

impl RefUnwindSafe for EncryptedData

impl Send for EncryptedData

impl Sync for EncryptedData

impl Unpin for EncryptedData

impl UnwindSafe for EncryptedData

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<R> ReadBytesExt for R where
    R: Read + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<W> WriteBytesExt for W where
    W: Write + ?Sized