Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
    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)
Пример #4
0
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)
Пример #5
0
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)