1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
https://github.com/tahoe-lafs/pycryptopp/issues/42
--- old/src/pycryptopp/cipher/aesmodule.cpp
+++ old/src/pycryptopp/cipher/aesmodule.cpp
@@ -20,6 +20,8 @@
#include <src-cryptopp/aes.h>
#endif
+typedef unsigned char byte;
+
static const char*const aes___doc__ = "_aes counter mode cipher\n\
You are advised to run aes.start_up_self_test() after importing this module.";
--- old/src/pycryptopp/cipher/xsalsa20module.cpp
+++ old/src/pycryptopp/cipher/xsalsa20module.cpp
@@ -16,6 +16,8 @@
#include <src-cryptopp/salsa.h>
#endif
+typedef unsigned char byte;
+
static const char* const xsalsa20__doc__ = "_xsalsa20 cipher";
static PyObject *xsalsa20_error;
--- old/src/pycryptopp/hash/sha256module.cpp
+++ old/src/pycryptopp/hash/sha256module.cpp
@@ -21,6 +21,8 @@
#include <src-cryptopp/filters.h>
#endif
+typedef unsigned char byte;
+
static const char*const sha256___doc__ = "_sha256 hash function";
static PyObject *sha256_error;
--- old/src/pycryptopp/publickey/rsamodule.cpp
+++ old/src/pycryptopp/publickey/rsamodule.cpp
@@ -87,7 +87,7 @@
VerifyingKey_serialize(VerifyingKey *self, PyObject *dummy) {
std::string outstr;
StringSink ss(outstr);
- self->k->DEREncode(ss);
+ self->k->GetMaterial().Save(ss);
PyStringObject* result = reinterpret_cast<PyStringObject*>(PyString_FromStringAndSize(outstr.c_str(), outstr.size()));
if (!result)
return NULL;
@@ -216,7 +216,7 @@
SigningKey_serialize(SigningKey *self, PyObject *dummy) {
std::string outstr;
StringSink ss(outstr);
- self->k->DEREncode(ss);
+ self->k->GetMaterial().Save(ss);
PyStringObject* result = reinterpret_cast<PyStringObject*>(PyString_FromStringAndSize(outstr.c_str(), outstr.size()));
if (!result)
return NULL;
|