I want to send the string to an encryption function which accepts an array of four (32-bit) integers.
So how to convert string to array of 32 bit integers in javascript and divide it to send it to function?
I want to send the string to an encryption function which accepts an array
Share
This smells of homework, but here you go.
Method 1:
Assuming you want to convert four characters in a string to ints, this will work:
Method 2:
Assuming you want to convert four characters to the numeric values of their chars, this will work:
Method 3:
Assuming you want to split a group of four numbers separated by a consistent delimiter, this will work.