api_func_sha224.go 427 B

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