aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap/python/core.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-10-09 22:28:02 +0000
committerlloyd <[email protected]>2009-10-09 22:28:02 +0000
commit9db719642349bc37126dee4b2837d3bba022d734 (patch)
treed77b7f94dbba6b7852da7c3e075bcd548b74caaf /src/wrap/python/core.cpp
parentd970d9feb203e497f72f1e9b4dc095b1d7ca308f (diff)
Reasonably functional RSA support; keygen, import/export, encrypt/decrypt, sign/verify
Diffstat (limited to 'src/wrap/python/core.cpp')
-rw-r--r--src/wrap/python/core.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/wrap/python/core.cpp b/src/wrap/python/core.cpp
index 59df863de..40af71ecf 100644
--- a/src/wrap/python/core.cpp
+++ b/src/wrap/python/core.cpp
@@ -11,34 +11,6 @@ using namespace Botan;
#include "python_botan.h"
-class Python_RandomNumberGenerator
- {
- public:
- Python_RandomNumberGenerator()
- { rng = RandomNumberGenerator::make_rng(); }
- ~Python_RandomNumberGenerator() { delete rng; }
-
- std::string name() const { return rng->name(); }
-
- void reseed() { rng->reseed(192); }
-
- int gen_random_byte() { return rng->next_byte(); }
-
- std::string gen_random(int n)
- {
- std::string s(n, 0);
- rng->randomize(reinterpret_cast<byte*>(&s[0]), n);
- return s;
- }
-
- void add_entropy(const std::string& in)
- { rng->add_entropy(reinterpret_cast<const byte*>(in.c_str()), in.length()); }
-
- RandomNumberGenerator& get_underlying_rng() { return *rng; }
- private:
- RandomNumberGenerator* rng;
- };
-
class Py_Cipher
{
public:
@@ -222,6 +194,6 @@ BOOST_PYTHON_MODULE(_botan)
python::def("cryptobox_decrypt", cryptobox_decrypt);
export_filters();
- export_pk();
+ export_rsa();
export_x509();
}