Exemplo n.º 1
0
 def get(self, request,  algorithm, text=""):
     hash_obj = GetHash(algorithm)
     return JsonResponse(hash_obj.gethash(text))
Exemplo n.º 2
0
 def post(self, request, algorithm, text=""):
     data = json.loads(request.body)
     text = data.get('text', "")
     hash_obj = GetHash(algorithm)
     return JsonResponse(hash_obj.gethash(text))