API converted to use vector of bytes.