### Home Classes Methods

### In Files

- lib/facets/digest/salted_digest.rb
- lib/facets/digest/base64digest.rb

### Methods

- #base64digest
- #base64digest!
- #salted_base64digest
- #salted_digest
- #salted_hexdigest

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Random
- Random::ArrayExtensions
- Random::HashExtensions
- Random::IntegerExtensions
- Random::NumericExtensions
- Random::RangeExtensions
- Random::StringExtensions
- Random::StringExtensions::Self
- FileUtils
- FileUtils::DryRun
- FileUtils::NoWrite
- FileUtils::Verbose
- Digest
- Digest::Class
- Digest::Instance
- Multiton
- Multiton::Inclusive
- Multiton::MetaMethods
- URI
- URI::Hash
- URI::Kernel
- Argvector
- Argvector
- ERB
- ERB::OpenTemplate
- Enumerable
- Enumerable::Arguments
- GetoptLong
- GetoptLong::DSL
- Memoizable
- Memoizable::Copy
- Numeric
- Numeric::Multipliers
- Object
- Object::ArgVector
- Timer
- Timer::Dummy
- Array
- BasicObject
- CGI
- Cloneable
- Continuation
- Date
- DateTime
- Equitable
- File
- Find
- Hash
- Instantiable
- Integer
- Interval
- Kernel
- Math
- Module
- Net
- NilClass
- NullClass
- OpEsc
- OpenStruct
- Pathname
- Platform
- Range
- RbConfig
- Set
- Shellwords
- String
- StringScanner
- Time
- Tuple
- YAML
- Zlib

No matching classes.

# Digest::Instance

### Public Instance Methods

base64digest(str = nil) click to toggle source

From Ruby 1.9.2 source

    # File lib/facets/digest/base64digest.rb, line 12
    def base64digest(str = nil)
      [str ? digest(str) : digest].pack('m0')
    end

base64digest!() click to toggle source

From Ruby 1.9.2 source

    # File lib/facets/digest/base64digest.rb, line 21
    def base64digest!
      [digest!].pack('m0')
    end

salted_base64digest(str, salt) click to toggle source

CREDIT: Guido De Rosa

    # File lib/facets/digest/salted_digest.rb, line 21
    def salted_base64digest(str, salt)
      [salted_digest(str, salt)].pack('m0')
    end

salted_digest(str='', salt=:auto) click to toggle source

CREDIT: Guido De Rosa

    # File lib/facets/digest/salted_digest.rb, line 8
    def salted_digest(str='', salt=:auto)
      if salt == :auto
        salt = String.random_binary(digest_length)
      end
      digest(str + salt) + salt
    end

salted_hexdigest(str, salt) click to toggle source

CREDIT: Guido De Rosa

    # File lib/facets/digest/salted_digest.rb, line 16
    def salted_hexdigest(str, salt)
      Digest.hexencode(salted_digest(str, salt))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.