I am trying to transfer AES key generate in js:
var AESkey = forge.random.getBytesSync(16);
exapmle if printed condsole i have "§½üå8bdÈP"
but printed in my java server it is "—§‡½Â\u001eĂĽĂĄ8b\u000edĂ?\u0012P›" (other data are ok)
I tried to get the bytes with Buffer.from(AESkey) but instead of getting a 16 bytes buffer I get a 22/24/25.. buffer lenghts.
In which format can I transfer the key and how can I get my AESkey to that format in js?
A possible solution:
This way the byte sequence can be safely transported.