KeyTransRecipientInfo.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // KeyTransRecipientInfo.cs - System.Security.Cryptography.Pkcs.KeyTransRecipientInfo
  3. //
  4. // Author:
  5. // Sebastien Pouliot ([email protected])
  6. //
  7. // (C) 2003 Motus Technologies Inc. (http://www.motus.com)
  8. //
  9. #if NET_1_2
  10. using System;
  11. using System.Collections;
  12. namespace System.Security.Cryptography.Pkcs {
  13. public sealed class KeyTransRecipientInfo : RecipientInfo {
  14. private byte[] _encryptedKey;
  15. private AlgorithmIdentifier _keyEncryptionAlgorithm;
  16. private SubjectIdentifier _recipientIdentifier;
  17. private int _version;
  18. // only accessible from EnvelopedPkcs7.RecipientInfos
  19. internal KeyTransRecipientInfo (byte[] encryptedKey, AlgorithmIdentifier keyEncryptionAlgorithm, SubjectIdentifier recipientIdentifier, int version)
  20. : base (RecipientInfoType.KeyTransport)
  21. {
  22. _encryptedKey = encryptedKey;
  23. _keyEncryptionAlgorithm = keyEncryptionAlgorithm;
  24. _recipientIdentifier = recipientIdentifier;
  25. _version = version;
  26. }
  27. public override byte[] EncryptedKey {
  28. get { return _encryptedKey; }
  29. }
  30. public override AlgorithmIdentifier KeyEncryptionAlgorithm {
  31. get { return _keyEncryptionAlgorithm; }
  32. }
  33. public override SubjectIdentifier RecipientIdentifier {
  34. get { return _recipientIdentifier; }
  35. }
  36. public override int Version {
  37. get { return _version; }
  38. }
  39. }
  40. }
  41. #endif