summaryrefslogtreecommitdiff
path: root/node/Salsa20.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Salsa20.hpp')
-rw-r--r--node/Salsa20.hpp34
1 files changed, 4 insertions, 30 deletions
diff --git a/node/Salsa20.hpp b/node/Salsa20.hpp
index 7e4c1e53..6405d450 100644
--- a/node/Salsa20.hpp
+++ b/node/Salsa20.hpp
@@ -56,51 +56,25 @@ public:
throw();
/**
- * Encrypt data using Salsa20/12
+ * Encrypt/decrypt data using Salsa20/12
*
* @param in Input data
* @param out Output buffer
* @param bytes Length of data
*/
- void encrypt12(const void *in,void *out,unsigned int bytes)
+ void crypt12(const void *in,void *out,unsigned int bytes)
throw();
/**
- * Encrypt data using Salsa20/20
+ * Encrypt/decrypt data using Salsa20/20
*
* @param in Input data
* @param out Output buffer
* @param bytes Length of data
*/
- void encrypt20(const void *in,void *out,unsigned int bytes)
+ void crypt20(const void *in,void *out,unsigned int bytes)
throw();
- /**
- * Decrypt data
- *
- * @param in Input data
- * @param out Output buffer
- * @param bytes Length of data
- */
- inline void decrypt12(const void *in,void *out,unsigned int bytes)
- throw()
- {
- encrypt12(in,out,bytes);
- }
-
- /**
- * Decrypt data
- *
- * @param in Input data
- * @param out Output buffer
- * @param bytes Length of data
- */
- inline void decrypt20(const void *in,void *out,unsigned int bytes)
- throw()
- {
- encrypt20(in,out,bytes);
- }
-
private:
union {
#ifdef ZT_SALSA20_SSE