extends Object
java.lang.Object | |
↳ | com.google.communication.businessmessaging.verifiedsms.hashing.VerifiedSmsHashGenerator |
Class Overview
This class converts SMS message strings and their segments into Base64-encoded hash values for use with the Verified SMS API (https://verifiedsms.googleapis.com).
Example usage:
VerifiedSmsHashGenerator verifiedSmsHashGenerator = new VerifiedSmsHashGenerator();
List<VerifiedSmsHashCode> hashedMessageValues = verifiedSmsHashGenerator.getDigests("Hello");
The VerifiedSmsHashCode
class contains the full message hash code, segments hash codes, and algorithm version information
need for: https://verifiedsms.googleapis.com/v1/smsOrigins/+12223334444/create
See https://developers.google.com/business-communications/verified-sms/guides/learn/register-messages for more information.
Summary
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns all hash values for the given full-length SMS message and its segments produced by all
hashing algorithms.
| |||||||||||
Returns hash values for the given full-length SMS message produced by all hashing algorithms.
|
Public Constructors
public VerifiedSmsHashGenerator ()
Public Methods
public List<VerifiedSmsHashCode> getDigests (String message, Collection<String> segments)
Returns all hash values for the given full-length SMS message and its segments produced by all hashing algorithms. Segments are required when the SMS message won't fit within one SMS. Include all parts in the segments collection.
Parameters | |
---|---|
message |
String : Full-length SMS message. |
segments |
Collection : SMS message segments. |
Returns | |
---|---|
List<VerifiedSmsHashCode> |
A collection of VerifiedSmsHashCode objects for use with the Verified SMS API. |
Throws | |
---|---|
NullPointerException |
Thrown if one of the given arguments is null. |
public List<VerifiedSmsHashCode> getDigests (String message)
Returns hash values for the given full-length SMS message produced by all hashing algorithms. Use this method if the SMS message is small enough to fit within one SMS.
Parameters | |
---|---|
message |
String : Full-length SMS message. |
Returns | |
---|---|
List<VerifiedSmsHashCode> |
A list of Verified SMS hash code objects for the given SMS message. |