예제 #1
0
 def __init__(self, key, algo='sha1'):
     md = getattr(m2, algo, None)
     if md is None:
         raise ValueError('unknown algorithm', algo)
     self.md = md()
     self.ctx = m2.hmac_ctx_new()
     m2.hmac_init(self.ctx, key, self.md)
예제 #2
0
파일: EVP.py 프로젝트: appknox/m2crypto
 def reset(self, key):
     # type: (bytes) -> None
     m2.hmac_init(self.ctx, key, self.md)
예제 #3
0
 def reset(self, key):
     m2.hmac_init(self.ctx, key, self.md)
예제 #4
0
 def reset(self, key):
     # type: (bytes) -> None
     m2.hmac_init(self.ctx, key, self.md)