AsymmetricKeyExchangeFormatter.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // System.Security.Cryptography AsymmetricKeyExchangeFormatter Class implementation
  3. //
  4. // Authors:
  5. // Thomas Neidhart ([email protected])
  6. //
  7. using System;
  8. using System.Security;
  9. namespace System.Security.Cryptography {
  10. /// <summary>
  11. /// Abstract base class for all asymmetric key exchange formatter.
  12. /// Available derived classes:
  13. /// RSAOAEPKeyExchangeFormatter, RSAPKCS1KeyExchangeFormatter
  14. /// </summary>
  15. public abstract class AsymmetricKeyExchangeFormatter {
  16. /// <summary>
  17. /// constructor, no idea why it is here (abstract class) :-)
  18. /// just for compatibility with MS
  19. /// </summary>
  20. public AsymmetricKeyExchangeFormatter() {
  21. }
  22. /// <summary>
  23. /// XML string containing the parameters of an asymmetric key exchange operation
  24. /// </summary>
  25. public abstract string Parameters {get;}
  26. /// <summary>
  27. /// create encrypted key exchange data
  28. /// </summary>
  29. public abstract byte[] CreateKeyExchange(byte[] data);
  30. /// <summary>
  31. /// create encrypted key exchange data
  32. /// </summary>
  33. public abstract byte[] CreateKeyExchange(byte[] data, Type symAlgType);
  34. /// <summary>
  35. /// set the private key
  36. /// </summary>
  37. public abstract void SetKey(AsymmetricAlgorithm key);
  38. } // AsymmetricKeyExchangeFormatter
  39. } // System.Security.Cryptography