aboutsummaryrefslogtreecommitdiff
path: root/lockchain-crypto/src/data.rs
diff options
context:
space:
mode:
authorKatharina Sabel <katharina.sabel@asquera.de>2018-05-08 01:06:58 +0200
committerKatharina Sabel <katharina.sabel@asquera.de>2018-05-08 01:06:58 +0200
commit4a86ec4771d6049fc4a8d0e82bf4a13a20bcfa1d (patch)
treefb4fc3550cb848df5c1cbcadc3b713a08b477a29 /lockchain-crypto/src/data.rs
parent2aa9772596b12496c05c46caed9c7c8c5ae9b32a (diff)
Basic encryption functions work
Diffstat (limited to 'lockchain-crypto/src/data.rs')
-rw-r--r--lockchain-crypto/src/data.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/lockchain-crypto/src/data.rs b/lockchain-crypto/src/data.rs
new file mode 100644
index 0000000..74698e4
--- /dev/null
+++ b/lockchain-crypto/src/data.rs
@@ -0,0 +1,13 @@
+//! A simple data layout
+
+use lcc::traits::AutoEncoder;
+
+/// Represents some packed data – includes nonce and blob
+#[derive(Serialize, Deserialize)]
+pub struct PackedData {
+ pub nonce: Vec<u8>,
+ pub iv: Vec<u8>,
+ pub data: Vec<u8>,
+}
+
+impl AutoEncoder for PackedData {} \ No newline at end of file