Encode key as base58

This commit is contained in:
Harald Leithner 2019-05-08 15:25:42 +02:00
parent 0e18b5d0c1
commit 4aab3c0061
4 changed files with 154 additions and 3 deletions

View file

@ -643,7 +643,8 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
*/
me.getSymmetricKey = function()
{
return sjcl.codec.base64.fromBits(sjcl.random.randomWords(8, 10), 0);
var bs58 = new baseX('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz');
return bs58.encode(sjcl.codec.base64.fromBits(sjcl.random.randomWords(8, 10), 0));
};
return me;