0

How can i print the values of [object ArrayBuffer] and [object Uint8Array] .

I have a variable which i on printing gives me the above objects but i am not able to retrieve their values.

encryptedBytes = toSupportedArray(e.target.result);

where ,

console.log("to send for encryption - e.target.result : "+e.target.result);

gives me the result :

to send for encryption - e.target.result : [object ArrayBuffer]

and

console.log("encryptedBytes : "+encryptedBytes);

gives me the result :

encryptedBytes : [object Uint8Array]

but how can i retrieve the values of the same.

Learner
  • 800
  • 1
  • 12
  • 34
  • possible duplicate of [Converting between strings and ArrayBuffers](http://stackoverflow.com/questions/6965107/converting-between-strings-and-arraybuffers) – Artjom B. Mar 04 '15 at 08:26
  • function ab2str(buf) { return String.fromCharCode.apply(null, new Uint16Array(buf)); } this particular function is giving me the result as - Ấ縬돐벅蝖粫훂岽糴畅ĸਘ룒흟❙샇ꁴ⮅氅ꄤ䷭瓼襳︽Ⅾ�⁐廙�⋦쎢᳒韫ퟙᚲ뇌턻暈曗ᅠ땶爖һ�䒸륳~欶잒ᚹ�䯀噀ᚦ裁 – Learner Mar 04 '15 at 08:45
  • Already tried that , now what could be the fix for this – Learner Mar 04 '15 at 08:46

0 Answers0