#Show the real content of the public part to console #Show the real content of the private part to console, be careful with this! ![]() Where the bits is the strength of your key, e.g 2048.Įither way you will have an RSA key object ( _RSAobj) returned, then you can do encryption as the rest of your code did. ![]() Or: key = RSA.generate(bits, randfunc=None, progress_func=None, e=65537) Where the externKey is a String, so you can load the key string from your key File with this way. So what you should do is: key = RSA.importKey(externKey, passphrase=None) Key = RSA.importKey(externKey, passphrase=None)įirst, ,e,d,p,q,u,private> is not a valid key, not sure how you get this, but it is a string representation of your key as a Python object only, the actual key content is not presented, also note that you cannot rebuild the key object with this string representation.īefore you do RSA encrypt with your key, you should import your key from some place like File, Generating In Memory etc. I get a syntax error at line 5 pointing at the ,e,d,p,q,u,private>') I am trying to write a RSA encryption software tool that will use the same key every single time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |