Class: Digest::MD5 (Ruby 2.5.7)
Description: Class : Digest::MD5 - Ruby 2.5.7

### Home Classes Methods

### In Files

- digest/bubblebabble/bubblebabble.c

### Parent

Digest::Base

### Class/Module Index

Quicksearch

- Digest
- Digest::Base
- Digest::Class
- Digest::Instance
- Digest::MD5
- Digest::RMD160
- Digest::SHA1
- Digest::SHA2
- Object

No matching classes.

# Digest::MD5

A class for calculating message digests using the `MD5` Message-Digest Algorithm by RSA Data Security, Inc., described in RFC1321.

`MD5` calculates a digest of 128 bits (16 bytes).

## Examples¶ ↑

    require 'digest'

    # Compute a complete digest
    Digest::MD5.hexdigest 'abc'      #=> "90015098..."

    # Compute digest by chunks
    md5 = Digest::MD5.new               # =>#<Digest::MD5>
    md5.update "ab"
    md5 << "c"                           # alias for #update
    md5.hexdigest                        # => "90015098..."

    # Use the same object to compute another digest
    md5.reset
    md5 << "message"
    md5.hexdigest                        # => "78e73102..."