api_func_sha224.go 508 B

1234567891011121314151617181920212223
  1. package route
  2. import (
  3. "opennamu/route/tool"
  4. jsoniter "github.com/json-iterator/go"
  5. )
  6. func Api_func_sha224(call_arg []string) string {
  7. var json = jsoniter.ConfigCompatibleWithStandardLibrary
  8. other_set := map[string]string{}
  9. json.Unmarshal([]byte(call_arg[0]), &other_set)
  10. hash_str := tool.Sha224(other_set["data"])
  11. return_data := make(map[string]interface{})
  12. return_data["response"] = "ok"
  13. return_data["data"] = hash_str
  14. json_data, _ := json.Marshal(return_data)
  15. return string(json_data)
  16. }