summaryrefslogtreecommitdiff
path: root/cipher-chachapoly.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-08-03 05:41:57 +0000
committerDarren Tucker <dtucker@zip.com.au>2016-08-09 09:06:52 +1000
commit4706c1d8c15cd5565b59512853c2da9bd4ca26c9 (patch)
tree81ff9de3bdf3627b382bb4b808cf0e0612f4424f /cipher-chachapoly.c
parente600348a7afd6325cc5cd783cb424065cbc20434 (diff)
upstream commit
small refactor of cipher.c: make ciphercontext opaque to callers feedback and ok markus@ Upstream-ID: 094849f8be68c3bdad2c0f3dee551ecf7be87f6f
Diffstat (limited to 'cipher-chachapoly.c')
-rw-r--r--cipher-chachapoly.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cipher-chachapoly.c b/cipher-chachapoly.c
index 7f31ff4ce..0899c5ad5 100644
--- a/cipher-chachapoly.c
+++ b/cipher-chachapoly.c
@@ -14,7 +14,7 @@
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */ 15 */
16 16
17/* $OpenBSD: cipher-chachapoly.c,v 1.7 2015/01/14 10:24:42 markus Exp $ */ 17/* $OpenBSD: cipher-chachapoly.c,v 1.8 2016/08/03 05:41:57 djm Exp $ */
18 18
19#include "includes.h" 19#include "includes.h"
20 20
@@ -28,7 +28,8 @@
28#include "ssherr.h" 28#include "ssherr.h"
29#include "cipher-chachapoly.h" 29#include "cipher-chachapoly.h"
30 30
31int chachapoly_init(struct chachapoly_ctx *ctx, 31int
32chachapoly_init(struct chachapoly_ctx *ctx,
32 const u_char *key, u_int keylen) 33 const u_char *key, u_int keylen)
33{ 34{
34 if (keylen != (32 + 32)) /* 2 x 256 bit keys */ 35 if (keylen != (32 + 32)) /* 2 x 256 bit keys */