summaryrefslogtreecommitdiffstats
path: root/tools/getb64key.py
blob: a0cd1c3ec347550c43d4dbc90b6c09aef649c087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python

import base64
import sys
import os

pkFile = open(sys.argv[1], 'rb').readlines()
base64Key = ""
inCert = False
for line in pkFile:
    if line.startswith("-"):
        inCert = not inCert
        continue

    base64Key += line.strip()

print base64.b16encode(base64.b64decode(base64Key)).lower()