CryptoServicesRegistrar.cs 573 B

123456789101112131415161718192021
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto
  5. {
  6. public static class CryptoServicesRegistrar
  7. {
  8. public static SecureRandom GetSecureRandom()
  9. {
  10. return new SecureRandom();
  11. }
  12. public static SecureRandom GetSecureRandom(SecureRandom secureRandom)
  13. {
  14. return secureRandom ?? new SecureRandom();
  15. }
  16. }
  17. }
  18. #pragma warning restore
  19. #endif