You can simply use one line javascript in browser console to convert a hex map key to base64. Open console in latest browser (F12 on Windows, ? Option+? Command+I on macOS, Ctrl+? Shift+I on Linux) and paste the code and replace the SHA-1
, SHA-256
hex map that Google Play provides under Release Setup App signing:
> btoa('a7:77:d9:20:c8:01:dd:fa:2c:3b:db:b2:ef:c5:5a:1d:ae:f7:28:6f'.split(':').map(hc => String.fromCharCode(parseInt(hc, 16))).join(''))
< "p3fZIMgB3fosO9uy78VaHa73KG8="
You can also convert it here; run the below code snippet and paste hex map key and hit convert button:
document.getElementById('convert').addEventListener('click', function() {
document.getElementById('result').textContent = btoa(
document.getElementById('hex-map').value
.split(':')
.map(hc => String.fromCharCode(parseInt(hc, 16)))
.join('')
);
});
_x000D_
<textarea id="hex-map" placeholder="paste hex key map here" style="width: 100%"></textarea>
<button id="convert">Convert</button>
<p><code id="result"></code></p>
_x000D_
And if you want to reverse a key hash to check and validate it:
> atob('p3fZIMgB3fosO9uy78VaHa73KG8=').split('').map(c => c.charCodeAt(0).toString(16)).join(':')
< "a7:77:d9:20:c8:1:dd:fa:2c:3b:db:b2:ef:c5:5a:1d:ae:f7:28:6f"
document.getElementById('convert').addEventListener('click', function() {
document.getElementById('result').textContent = atob(document.getElementById('base64-hash').value)
.split('')
.map(c => c.charCodeAt(0).toString(16))
.join(':')
});
_x000D_
<textarea id="base64-hash" placeholder="paste base64 key hash here" style="width: 100%"></textarea>
<button id="convert">Convert</button>
<p><code id="result"></code></p>
_x000D_