From 8febbc657bb2b99934ef3c162d49052ab48e5a84 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 14 Oct 2009 00:23:42 +0000 Subject: [PATCH] added compute_hash() method --- sfa/trust/certificate.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sfa/trust/certificate.py b/sfa/trust/certificate.py index 5a322430..54d98eb1 100644 --- a/sfa/trust/certificate.py +++ b/sfa/trust/certificate.py @@ -203,6 +203,9 @@ class Keypair: k.verify_update(data) return M2Crypto.m2.verify_final(k.ctx, base64.b64decode(sig), k.pkey) + def compute_hash(self, value): + return self.sign_string(str(value)) + ## # The certificate class implements a general purpose X509 certificate, making # use of the appropriate pyOpenSSL or M2Crypto abstractions. It also adds -- 2.43.0