aboutsummaryrefslogtreecommitdiff
path: root/lockchain-core/src/crypto/data.rs
blob: f1ed15c0bfe9eb5c5409480fc6374ff1e7f24d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::traits::AutoEncoder;
use serde::{Serialize, Deserialize};

/// Representation of encrypted data as an enecoded format
///
/// Includes all cryptographic state primitives that are
/// required to send the data over a network and decrypt on
/// the other side of a pipe.
#[derive(Serialize, Deserialize)]
pub struct PackedData {
    pub nonce: Vec<u8>,
    pub iv: Vec<u8>,
    pub data: Vec<u8>,
}

impl AutoEncoder for PackedData {}