Top-rated recipes tagged "inverse"http://code.activestate.com/recipes/tags/inverse/top/2013-12-27T06:43:59-08:00ActiveState Code RecipesPublic Key Encryption (RSA) (Python)
2012-05-12T23:34:22-07:00Raymond Hettingerhttp://code.activestate.com/recipes/users/178123/http://code.activestate.com/recipes/577737-public-key-encryption-rsa/
<p style="color: grey">
Python
recipe 577737
by <a href="/recipes/users/178123/">Raymond Hettinger</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/inverse/">inverse</a>, <a href="/recipes/tags/multiplicative/">multiplicative</a>, <a href="/recipes/tags/primality_testing/">primality_testing</a>, <a href="/recipes/tags/primes/">primes</a>, <a href="/recipes/tags/publickey/">publickey</a>, <a href="/recipes/tags/rsa/">rsa</a>).
Revision 2.
</p>
<p>Simple code to create and use public/private keypairs. Accompanied by a rudimentary encoder.</p>
Public Key Encryption (RSA) (Python)
2013-12-27T06:43:59-08:00Mohammad Taha Jahangirhttp://code.activestate.com/recipes/users/4188847/http://code.activestate.com/recipes/578797-public-key-encryption-rsa/
<p style="color: grey">
Python
recipe 578797
by <a href="/recipes/users/4188847/">Mohammad Taha Jahangir</a>
(<a href="/recipes/tags/encryption/">encryption</a>, <a href="/recipes/tags/inverse/">inverse</a>, <a href="/recipes/tags/multiplicative/">multiplicative</a>, <a href="/recipes/tags/primality_testing/">primality_testing</a>, <a href="/recipes/tags/primes/">primes</a>, <a href="/recipes/tags/publickey/">publickey</a>, <a href="/recipes/tags/rsa/">rsa</a>).
Revision 3.
</p>
<p>Simple code to create and use public/private keypairs. Accompanied by a rudimentary encoder.</p>
Flipdict -- python dict that also maintains a one-to-one inverse mapping (Python)
2009-12-03T14:43:52-08:00Francis Carrhttp://code.activestate.com/recipes/users/4172444/http://code.activestate.com/recipes/576968-flipdict-python-dict-that-also-maintains-a-one-to-/
<p style="color: grey">
Python
recipe 576968
by <a href="/recipes/users/4172444/">Francis Carr</a>
(<a href="/recipes/tags/1_to_1/">1_to_1</a>, <a href="/recipes/tags/bijection/">bijection</a>, <a href="/recipes/tags/bijective/">bijective</a>, <a href="/recipes/tags/dict/">dict</a>, <a href="/recipes/tags/injection/">injection</a>, <a href="/recipes/tags/injective/">injective</a>, <a href="/recipes/tags/inverse/">inverse</a>, <a href="/recipes/tags/invert/">invert</a>, <a href="/recipes/tags/mapping/">mapping</a>, <a href="/recipes/tags/one_to_one/">one_to_one</a>).
Revision 6.
</p>
<p>A Flipdict is a python dict subclass that maintains a one-to-one inverse mapping. Each key maps to a unique value, and each value maps back to that same key. Each instance has a "flip" attribute to access the inverse mapping.</p>