Fix conversion from WordArray to byte array

Looks like Array::slice() on the buffer isn't always working. Use to_hex() and
convert from that instead.