mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-27 19:16:08 -04:00
17 lines
252 B
Python
17 lines
252 B
Python
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from Crypto.Hash import SHA256
|
|
from Crypto.PublicKey import RSA
|
|
from Crypto import Random
|
|
|
|
key = RSA.generate(1024)
|
|
text = 'abcdefgh'
|
|
|
|
hash = SHA256.new(text).digest()
|
|
print hash
|
|
|
|
signature = key.sign(hash, '')
|
|
print signature
|