aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2013-06-11 14:51:30 +0000
committerlloyd <[email protected]>2013-06-11 14:51:30 +0000
commit195a1434006e288416886960e9cf9e81d49e0a58 (patch)
tree6e1934029b2aecf60c786e338be878e0a0d0a856 /src
parent572abfa4fac511950805710787544116fb361e47 (diff)
Add missing header
Diffstat (limited to 'src')
-rw-r--r--src/constructs/cryptobox_psk/cryptobox_psk.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/constructs/cryptobox_psk/cryptobox_psk.h b/src/constructs/cryptobox_psk/cryptobox_psk.h
new file mode 100644
index 000000000..2f16ee461
--- /dev/null
+++ b/src/constructs/cryptobox_psk/cryptobox_psk.h
@@ -0,0 +1,47 @@
+/*
+* Cryptobox Message Routines
+* (C) 2009,2013 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
+
+#ifndef BOTAN_CRYPTOBOX_PSK_H__
+#define BOTAN_CRYPTOBOX_PSK_H__
+
+#include <string>
+#include <botan/rng.h>
+#include <botan/symkey.h>
+
+namespace Botan {
+
+/**
+* This namespace holds various high-level crypto functions
+*/
+namespace CryptoBox {
+
+/**
+* Encrypt a message using a shared secret key
+* @param input the input data
+* @param input_len the length of input in bytes
+* @param key the key used to encrypt the message
+* @param rng a ref to a random number generator, such as AutoSeeded_RNG
+*/
+BOTAN_DLL std::vector<byte> encrypt(const byte input[], size_t input_len,
+ const SymmetricKey& key,
+ RandomNumberGenerator& rng);
+
+/**
+* Encrypt a message using a shared secret key
+* @param input the input data
+* @param input_len the length of input in bytes
+* @param key the key used to encrypt the message
+* @param rng a ref to a random number generator, such as AutoSeeded_RNG
+*/
+BOTAN_DLL secure_vector<byte> decrypt(const byte input[], size_t input_len,
+ const SymmetricKey& key);
+
+}
+
+}
+
+#endif