RSABlindingParameters.cs 767 B

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