instance method
OpenSSL::Digest#reset
() -> self
digest.reset → self
ext/openssl/ossl_digest.c
View on GitHub ↗
static VALUE
ossl_digest_reset(VALUE self)
{
EVP_MD_CTX *ctx;
GetDigest(self, ctx);
if (EVP_DigestInit_ex(ctx, EVP_MD_CTX_get0_md(ctx), NULL) != 1) {
ossl_raise(eDigestError, "Digest initialization failed.");
}
return self;
}
Resets the Digest in the sense that any Digest#update that has been performed is abandoned and the Digest is set to its initial state again.