python RSA module how to use java decrypt -


i use python rsa module(http://stuvel.eu/rsa) private_key , public_key.
how can use these private_key , public_key encrypt or decrypt in java?

thank all. think have got method. python's rsa module can generate (n,p,q,e,d).i can use follow method in java

keyfactory s=keyfactory.getinstance("rsa");

key pri_k=s.generateprivate(new rsaprivatekeyspec(new biginteger(n=p*q),new biginteger(e));

key pub_k=s.generatepublic(new rsapublickeyspec(new biginteger(n=p*q),new biginteger(d));

the second method run .py in command(not jython). such as: runtime.getruntime().exec("python c:\test.py")


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -