summaryrefslogtreecommitdiff
path: root/nacl/tests/scalarmult4.cpp
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-13 10:09:38 -0400
committerirungentoo <irungentoo@gmail.com>2013-07-13 10:09:38 -0400
commitd4fe483efd3e0062f12430efe9deb66d43d914d7 (patch)
treee6aa9ac716ae82cdb15c6e6cb5d9d1d9d29f053b /nacl/tests/scalarmult4.cpp
parent835ef0320d47372eac14bef31c979b8217d04498 (diff)
NaCl moved to other repo.
Diffstat (limited to 'nacl/tests/scalarmult4.cpp')
-rw-r--r--nacl/tests/scalarmult4.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/nacl/tests/scalarmult4.cpp b/nacl/tests/scalarmult4.cpp
deleted file mode 100644
index 8e4d64e9..00000000
--- a/nacl/tests/scalarmult4.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
1#include <iostream>
2#include <iomanip>
3#include <string>
4using std::string;
5using std::cout;
6using std::setfill;
7using std::setw;
8using std::hex;
9#include "crypto_scalarmult_curve25519.h"
10
11char bobsk_bytes[32] = {
12 0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
13,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
14,0x6f,0x3b,0xb1,0x29,0x26,0x18,0xb6,0xfd
15,0x1c,0x2f,0x8b,0x27,0xff,0x88,0xe0,0xeb
16} ;
17
18main()
19{
20 int i;
21 cout << setfill('0');
22 string bobsk(bobsk_bytes,sizeof bobsk_bytes);
23 string bobpk = crypto_scalarmult_curve25519_base(bobsk);
24 for (i = 0;i < bobpk.size();++i) {
25 unsigned char c = bobpk[i];
26 if (i > 0) cout << ","; else cout << " ";
27 cout << "0x" << hex << setw(2) << (unsigned int) c;
28 if (i % 8 == 7) cout << "\n";
29 }
30 return 0;
31}