def update(self, data): """ Add data to be digested. @return: -1 for Python error, 1 for success, 0 for OpenSSL failure. """ return m2.digest_update(self.ctx, data)
def update(self, data): # type: (bytes) -> int """ Add data to be digested. :return: -1 for Python error, 1 for success, 0 for OpenSSL failure. """ return m2.digest_update(self.ctx, data)
def m2c_sha(iter, txt=txt): ctx = m2.md_ctx_new() m2.digest_init(ctx, m2.sha1()) for i in range(iter): m2.digest_update(ctx, txt) out = m2.digest_final(ctx)