com.ooyala.android.EmbeddedSignatureGenerator Class Reference
Inheritance diagram for com.ooyala.android.EmbeddedSignatureGenerator:
com.ooyala.android.SignatureGenerator

Public Member Functions

 EmbeddedSignatureGenerator (String secret)
 
String sign (String data)
 Generate the APIv2/SAS style signature This method should do the following: More...
 

Constructor & Destructor Documentation

com.ooyala.android.EmbeddedSignatureGenerator.EmbeddedSignatureGenerator ( String  secret)

Member Function Documentation

String com.ooyala.android.EmbeddedSignatureGenerator.sign ( String  data)

Generate the APIv2/SAS style signature This method should do the following:

  • Prepend the secret key to data
  • Hash the resulting string using the SHA256 algorithm
  • Base64 encode the resulting hash
  • Convert the Base64 encoded hash to a String
  • Truncate the String to 43 characters
  • Strip any '=' characters from the end of the truncated String
  • Return the resulting String
Parameters
datathe String to create the signature from (not prepended with the secret key)
Returns
String containing the signature

Implements com.ooyala.android.SignatureGenerator.