7
1
I can generate a byte array with
var myByteArray = window.crypto.getRandomValues(new Uint8Array(16))
and I get
181,143,16,173,231,56,63,149,181,185,224,124,84,230,123,36
I can then turn this into a string with
cryptoHelpers.convertByteArrayToString(myByteArray);
and i get
µç8?µ¹à|Tæ{$
But what I really want is a 128 bit hexadecimal like...
6a3e52297b2e593f4d506f7164
And I want to be able to go back from hexadecimal to a byte array.
Is there a copy and paste function or library to make this magic happen?
3I'm voting to close this question as off-topic because it is unrelated to Bitcoin. – Anonymous – 2018-10-12T11:25:11.923
You should ask this question on Stackoverflow, however search first. I'm positive the answer will already exist. – Jestin – 2018-10-17T18:15:19.680
I'm voting to close this question as off-topic because, the question, as written, does not appear related to bitcoin. Perhaps there is a relation, but if so, it should be made explicit. – dbkeys – 2018-10-20T09:53:53.403