Displaying 1 result from an estimated 1 matches for "b2a_base64".
Did you mean:
a2b_base64
2015 Jun 30
2
how is the sha fingerprint generated?
...= binascii.a2b_base64(sys.argv[1])
if sys.argv[2] == "md5":
m = hashlib.new("md5")
m.update(key)
print(m.hexdigest())
elif sys.argv[2] == "sha256":
m = hashlib.new("sha256")
m.update(key)
print(binascii.b2a_base64(m.digest()).decode("utf8")[0:-1])
Do use it in production, do some test, but the general idea is there.
Cheers,
On Tue, 30 Jun 2015 16:12:03 +0200
Johannes L?thberg <johannes at kyriasis.com> wrote:
> On 30/06, Johannes L?thberg wrote:
> >On 30/06, shawn wilson wrote:...