class Digest::Class
This module stands as a base class for digest implementation classes.
Public Class Methods
(string str) → String
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/digest/0/digest.rbs, line 322
def self.base64digest: (string str) -> String
Returns the base64 encoded hash value of a given string. The return value is properly padded with ‘=’ and contains no line feeds.
(string) → String
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/digest/0/digest.rbs, line 330
def self.bubblebabble: (string) -> String
Returns the BubbleBabble encoded hash value of a given string.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/digest/0/digest.rbs, line 341
def self.digest: (string) -> String
Returns the hash value of a given string. This is equivalent to Digest::Class.new(parameters).digest(string), where extra parameters, if any, are passed through to the constructor and the string* is passed to
(string name) → instance
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/digest/0/digest.rbs, line 353
def self.file: (string name) -> instance
Creates a digest object and reads a given file, name. Optional arguments are passed to the constructor of the digest class.
p Digest::SHA256.file("X11R6.8.2-src.tar.bz2").hexdigest # => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/digest/0/digest.rbs, line 362
def self.hexdigest: (string) -> String
Returns the hex-encoded hash value of a given string. This is almost equivalent to Digest.hexencode(Digest::Class.new(*parameters).digest(string)).
() → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/digest/0/digest.rbs, line 366
def initialize: () -> void