Skip to content

Instantly share code, notes, and snippets.

View ckoys's full-sized avatar
💭
I may be slow to respond.

Christian Koys ckoys

💭
I may be slow to respond.
View GitHub Profile
@kballenegger
kballenegger / crypto_box_test.c
Created March 1, 2013 00:59
A working test of using NaCl's crypto_box.
#include <stdio.h>
#include <sodium/crypto_box.h>
#include <sodium/randombytes.h>
int main(int argc, char *argv[]) {
// payload
unsigned char payload[] = "Hello world, this is a test payload to test NaCl's cipher.";
unsigned char payload_padded[crypto_box_ZEROBYTES + sizeof(payload)] = {0};
for (int i = 0; i < sizeof(payload); i++)