Add ZBase32 encoding function

See: https://tools.ietf.org/html/rfc6189#section-5.1.6
This commit is contained in:
Wiktor Kwapisiewicz
2018-05-25 21:55:58 +02:00
parent bf428b80d4
commit da98ccb421
2 changed files with 43 additions and 0 deletions

View File

@@ -165,4 +165,11 @@ describe('Util unit tests', function() {
});
});
describe("Zbase32", function() {
it('util.encodeZBase32 encodes correctly', function() {
const encoded = openpgp.util.encodeZBase32(openpgp.util.str_to_Uint8Array('test-wkd'));
expect(encoded).to.equal('qt1zg7bpq7ise');
})
})
});