diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-13 10:09:38 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-13 10:09:38 -0400 |
commit | d4fe483efd3e0062f12430efe9deb66d43d914d7 (patch) | |
tree | e6aa9ac716ae82cdb15c6e6cb5d9d1d9d29f053b /nacl/tests/scalarmult4.cpp | |
parent | 835ef0320d47372eac14bef31c979b8217d04498 (diff) |
NaCl moved to other repo.
Diffstat (limited to 'nacl/tests/scalarmult4.cpp')
-rw-r--r-- | nacl/tests/scalarmult4.cpp | 31 |
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> | ||
4 | using std::string; | ||
5 | using std::cout; | ||
6 | using std::setfill; | ||
7 | using std::setw; | ||
8 | using std::hex; | ||
9 | #include "crypto_scalarmult_curve25519.h" | ||
10 | |||
11 | char 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 | |||
18 | main() | ||
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 | } | ||