forked from cory/tildefriends
Add libsodium to the tree and build what's needed from source.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3859 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
23
deps/libsodium/test/default/scalarmult2.c
vendored
Normal file
23
deps/libsodium/test/default/scalarmult2.c
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
#define TEST_NAME "scalarmult2"
|
||||
#include "cmptest.h"
|
||||
|
||||
static unsigned char bobsk[32] = { 0x5d, 0xab, 0x08, 0x7e, 0x62, 0x4a, 0x8a,
|
||||
0x4b, 0x79, 0xe1, 0x7f, 0x8b, 0x83, 0x80,
|
||||
0x0e, 0xe6, 0x6f, 0x3b, 0xb1, 0x29, 0x26,
|
||||
0x18, 0xb6, 0xfd, 0x1c, 0x2f, 0x8b, 0x27,
|
||||
0xff, 0x88, 0xe0, 0xeb };
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
unsigned char bobpk[32];
|
||||
char hex[65];
|
||||
int i;
|
||||
|
||||
crypto_scalarmult_base(bobpk, bobsk);
|
||||
sodium_bin2hex(hex, sizeof hex, bobpk, sizeof bobpk);
|
||||
printf("%s\n", hex);
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user