modify the sm2 struct to string function