add rstrtohex and fix PSS