Class: MailchimpAPI::Audience::Utils::SubscriberHash Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mailchimp-api/resources/audience/utils/subscriber_hash.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Internal class for generating MD5 hashes of email addresses

Class Method Summary collapse

Class Method Details

.call(email) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generates an MD5 hash of a lowercase email address

Examples:

SubscriberHash.call("[email protected]") # => "b58996c504c5638798eb6b511e6f49af"

Parameters:

  • email (String)

    Email address to hash

Returns:

  • (String)

    MD5 hash of the lowercase email



18
19
20
# File 'lib/mailchimp-api/resources/audience/utils/subscriber_hash.rb', line 18

def self.call(email)
  Digest::MD5.hexdigest(email.downcase)
end