b)
import os
import base64

encoded = base64.b32encode(os.urandom(12)).decode('utf-8').rstrip('=').lower()
print('-'.join([encoded[i:i+4] for i in range(0, len(encoded), 4)]))

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2073269

Title:
  [MIR] libconvert-base32-perl and libcrypt-urandom-perl

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/freeradius/+bug/2073269/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to