diff options
Diffstat (limited to 'tools/getb64key.py')
-rwxr-xr-x | tools/getb64key.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/getb64key.py b/tools/getb64key.py new file mode 100755 index 0000000..976a157 --- /dev/null +++ b/tools/getb64key.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +from __future__ import print_function + +import base64 +import sys + +pkFile = open(sys.argv[1], 'rb').readlines() +base64Key = "" +inCert = False +for line in pkFile: + if line.startswith(b"-"): + inCert = not inCert + continue + + base64Key += line.strip() + +print(base64.b16encode(base64.b64decode(base64Key)).lower()) |