Node.js examples for String:Base 64
Utility to convert from byte arrays to word arrays
function byte_to_word( array ) { var i = 0, l = array.length, result = [];//from ww w . jav a 2s . c om while ( i < l ) { result[i / 2] = array[i++] << 8 | array[i++]; } return result; }