emails = ['cust...@example.com', 'cust...@example.com',
' Cust...@example.com ']
members = [{'hashedEmail': NormalizeAndSHA256(email)} for email in emails]
# Add address info.
members.append({
'addressInfo': {
# First and last name must be normalized and hashed.
'hashedFirstName': NormalizeAndSHA256('John'),
'hashedLastName': NormalizeAndSHA256('Doe'),
# Country code and zip code are sent in plaintext.
'countryCode': 'US',
'zipCode': '10001'
}
[{'hashedEmail': self.normalize_and_sha256('cust...@example.com'),
'hashedPhoneNumber': self.normalize_and_sha256('+1999999999'),
'addressInfo': {
'hashedFirstName': self.normalize_and_sha256('John'),
'hashedLastName': self.normalize_and_sha256('Doe'),
'countryCode': 'US',
'zipCode': '10001'
}}, {'hashedEmail': self.normalize_and_sha256('cust...@example.com'),
'hashedPhoneNumber': self.normalize_and_sha256('+1999999999'),
'addressInfo': {
'hashedFirstName': self.normalize_and_sha256('John'),
'hashedLastName': self.normalize_and_sha256('Doe'),
'countryCode': 'US',
'zipCode': '10001'
}}]