new wrap keys function, however the server side is failing due to invalid syntax for bytea data