instance method
OpenSSL::Digest#digest_length
() -> ::Integer
digest.digest_length → integer
ext/openssl/ossl_digest.c
View on GitHub ↗
static VALUE
ossl_digest_size(VALUE self)
{
EVP_MD_CTX *ctx;
GetDigest(self, ctx);
return INT2NUM(EVP_MD_CTX_size(ctx));
}
Returns the output size of the digest, i.e. the length in bytes of the final message digest result.
Example
Example
digest = OpenSSL::Digest.new('SHA1') puts digest.digest_length # => 20