暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CrossPlatformValidator.cs 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. namespace UnityEngine.Purchasing.Security
  5. {
  6. /// <summary>
  7. /// Stub cross-platform receipt validator class for platforms not supported by this feature.
  8. /// Will always throw exceptions if used.
  9. /// </summary>
  10. public class CrossPlatformValidator
  11. {
  12. /// <summary>
  13. /// Constructs an instance and checks the validity of the certification keys
  14. /// which only takes input parameters for the supported platforms and uses a common bundle ID for Apple and GooglePlay.
  15. /// </summary>
  16. /// <param name="googlePublicKey"> The GooglePlay public key. </param>
  17. /// <param name="appleRootCert"> The Apple certification key. </param>
  18. /// <param name="appBundleId"> The bundle ID for all platforms. </param>
  19. public CrossPlatformValidator(byte[] googlePublicKey, byte[] appleRootCert, string appBundleId)
  20. {
  21. throw new NotImplementedException();
  22. }
  23. /// <summary>
  24. /// Constructs an instance and checks the validity of the certification keys
  25. /// which only takes input parameters for the supported platforms.
  26. /// </summary>
  27. /// <param name="googlePublicKey"> The GooglePlay public key. </param>
  28. /// <param name="appleRootCert"> The Apple certification key. </param>
  29. /// <param name="googleBundleId"> The GooglePlay bundle ID. </param>
  30. /// <param name="appleBundleId"> The Apple bundle ID. </param>
  31. public CrossPlatformValidator(byte[] googlePublicKey, byte[] appleRootCert, string googleBundleId, string appleBundleId)
  32. {
  33. throw new NotImplementedException();
  34. }
  35. /// <summary>
  36. /// Validates a receipt.
  37. /// </summary>
  38. /// <param name="unityIAPReceipt"> The receipt to be validated. </param>
  39. /// <returns> An array of receipts parsed from the validation process </returns>
  40. public IPurchaseReceipt[] Validate(string unityIAPReceipt)
  41. {
  42. throw new NotImplementedException();
  43. }
  44. }
  45. }