changed salt generation to return hexstring