[utils] Add bytes_to_long() and long_to_bytes()
authorYen Chi Hsuan <yan12125@gmail.com>
Tue, 28 Feb 2017 11:16:55 +0000 (19:16 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Tue, 28 Feb 2017 14:10:31 +0000 (22:10 +0800)
commit0a5445ddbeb8d391bbac92e5fe9074c6aa2e1565
tree61313a7ee99210ff44e2e9627a71ac91d7f2cf4c
parentf48409c7ac186fa38bbeb2df2b210e37a18eb04b
[utils] Add bytes_to_long() and long_to_bytes()

Used in daisuki.net (#4738)

Both are adapted from public domain PyCrypto:
https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/Util/number.py
youtube_dl/utils.py