Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
Digest::Class.hexdigest
(::string) -> ::String
Digest::Class.hexdigest(string[, ...]) → hash_string
ext/digest/digest.c
View on GitHub ↗
static VALUE
rb_digest_class_s_hexdigest(int argc, VALUE *argv, VALUE klass)
{
return hexencode_str_new(rb_funcallv(klass, id_digest, argc, argv));
}
Returns the hex-encoded hash value of a given string. This is almost equivalent to Digest.hexencode(Digest::Class.new(*parameters).digest(string)).