Module: Digest
- Defined in:
- ext/rubysl/digest/digest.c,
lib/digest/hmac.rb,
lib/digest/sha2.rb,
lib/rubysl/digest/digest.rb,
ext/rubysl/digest/digest.c
Overview
This module provides a framework for message digest libraries.
Defined Under Namespace
Modules: Instance Classes: Base, Class, HMAC, MD5, RMD160, SHA1, SHA2
Class Method Summary collapse
-
.bubblebabble(string) ⇒ Object
Returns a BubbleBabble encoded version of a given string.
-
.const_missing(name) ⇒ Object
:nodoc:.
-
.hexencode(string) ⇒ Object
Generates a hex-encoded version of a given string.
Class Method Details
.bubblebabble(string) ⇒ Object
Returns a BubbleBabble encoded version of a given string.
92 93 94 95 96 |
# File 'ext/rubysl/digest/bubblebabble/bubblebabble.c', line 92
static VALUE
rb_digest_s_bubblebabble(VALUE klass, VALUE str)
{
return bubblebabble_str_new(str);
}
|
.const_missing(name) ⇒ Object
:nodoc:
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rubysl/digest/digest.rb', line 4 def self.const_missing(name) # :nodoc: case name when :SHA256, :SHA384, :SHA512 lib = 'digest/sha2' else lib = File.join('digest', name.to_s.downcase) end begin require lib rescue LoadError raise LoadError, "library not found for class Digest::#{name} -- #{lib}", caller(1) end unless Digest.const_defined?(name) raise NameError, "uninitialized constant Digest::#{name}", caller(1) end Digest.const_get(name) end |
.hexencode(string) ⇒ Object
Generates a hex-encoded version of a given string.
79 80 81 82 83 |
# File 'ext/rubysl/digest/digest.c', line 79
static VALUE
rb_digest_s_hexencode(VALUE klass, VALUE str)
{
return hexencode_str_new(str);
}
|