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

Public Member Functions

String sign (String data)
 Generate the APIv2/SAS style signature. More...
 

Member Function Documentation

String com.ooyala.android.SignatureGenerator.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 an NSString
  • Truncate the NSString to 43 characters
  • Strip any '=' characters from the end of the truncated NSString
  • Return the resulting NSString
Parameters
datathe NSString to create the signature from (not prepended with the secret key)
Returns
an NSString containing the signature

Implemented in com.ooyala.android.EmbeddedSignatureGenerator.