|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttv.ouya.console.api.OuyaEncryptionHelper
public class OuyaEncryptionHelper
| Constructor Summary | |
|---|---|
OuyaEncryptionHelper()
|
|
| Method Summary | |
|---|---|
static tv.ouya.console.api.Product |
decryptProductResponse(java.lang.String encryptedResponse,
byte[] appKey)
Decrypt a Product response from the server using the supplied application public key. |
java.lang.String |
decryptPurchaseResponse(org.json.JSONObject encryptedResponse,
java.security.PublicKey appKey)
Decrypt a purchase response from the server using the supplied application public key. |
java.util.List<tv.ouya.console.api.Receipt> |
decryptReceiptResponse(org.json.JSONObject encryptedResponse,
java.security.PublicKey appKey)
Decrypt a receipt response from the server using the supplied application public key. |
java.util.List<tv.ouya.console.api.Receipt> |
parseJSONReceiptResponse(org.json.JSONArray receiptArray)
Parse a JSONArray holding Receipts. |
java.util.List<tv.ouya.console.api.Receipt> |
parseJSONReceiptResponse(java.lang.String receiptResponse)
Parse the receipt JSON. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OuyaEncryptionHelper()
| Method Detail |
|---|
public java.util.List<tv.ouya.console.api.Receipt> decryptReceiptResponse(org.json.JSONObject encryptedResponse,
java.security.PublicKey appKey)
throws java.security.GeneralSecurityException,
java.io.IOException,
org.json.JSONException,
java.text.ParseException
encryptedResponse - The encrypted response from the server.appKey - The applications public key.
java.security.GeneralSecurityException - Thrown if there is an issue decrypting the server response.
java.io.IOException - Thrown if there is a problem parsing the response from the server.
org.json.JSONException
java.text.ParseException
public java.lang.String decryptPurchaseResponse(org.json.JSONObject encryptedResponse,
java.security.PublicKey appKey)
throws java.security.GeneralSecurityException,
java.io.IOException,
org.json.JSONException,
java.text.ParseException
encryptedResponse - The encrypted response from the server.appKey - The applications public key.
java.security.GeneralSecurityException - Thrown if there is an issue decrypting the server response.
java.io.IOException - Thrown if there is a problem parsing the response from the server.
org.json.JSONException
java.text.ParseException
public java.util.List<tv.ouya.console.api.Receipt> parseJSONReceiptResponse(java.lang.String receiptResponse)
throws java.io.IOException
receiptResponse - the receipt response to parse
java.io.IOException
public java.util.List<tv.ouya.console.api.Receipt> parseJSONReceiptResponse(org.json.JSONArray receiptArray)
throws org.json.JSONException,
java.text.ParseException
receiptArray - The JSON array holding the purchase information.
org.json.JSONException
java.text.ParseException
public static tv.ouya.console.api.Product decryptProductResponse(java.lang.String encryptedResponse,
byte[] appKey)
throws java.security.GeneralSecurityException,
java.io.IOException,
org.json.JSONException
encryptedResponse - The encrypted response from the server.appKey - The applications public key.
java.security.GeneralSecurityException - Thrown if there is an issue decrypting the server response.
java.io.IOException - Thrown if there is a problem parsing the response from the server.
org.json.JSONException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||