root/hodgestar/PythonCode/AacsKeyFactoring/AACS.py

Revision 34, 210 bytes (checked in by simon, 5 years ago)

Some silly code for factoring a AACS key using numbthy.

  • Property svn:mime-type set to text/python-source
  • Property svn:eol-style set to native
Line 
1import math
2import numbthy
3
4h = '09F911029D74E35BD84156C5635688C0'
5x = int(h,16)
6factors = numbthy.factors(x)
7
8def check(x,factors):
9   for f in factors:
10     assert x % f == 0
11     x = x / f
12   assert x == 1
13
Note: See TracBrowser for help on using the browser.