string::arrayBufferToOctets takes an ArrayBuffer argument; not a string.