RSABlindingParameters.cs 861 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
  6. {
  7. public class RsaBlindingParameters
  8. : ICipherParameters
  9. {
  10. private readonly RsaKeyParameters publicKey;
  11. private readonly BigInteger blindingFactor;
  12. public RsaBlindingParameters(
  13. RsaKeyParameters publicKey,
  14. BigInteger blindingFactor)
  15. {
  16. if (publicKey.IsPrivate)
  17. throw new ArgumentException("RSA parameters should be for a public key");
  18. this.publicKey = publicKey;
  19. this.blindingFactor = blindingFactor;
  20. }
  21. public RsaKeyParameters PublicKey
  22. {
  23. get { return publicKey; }
  24. }
  25. public BigInteger BlindingFactor
  26. {
  27. get { return blindingFactor; }
  28. }
  29. }
  30. }
  31. #pragma warning restore
  32. #endif