Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.2 KiB

  1. // EncodedMsg.h -- Encoded Message class header
  2. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  3. // 1999. This computer program includes Confidential, Proprietary
  4. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  5. // use, disclosure, and/or reproduction is prohibited unless authorized
  6. // in writing. All Rights Reserved.
  7. #if !defined(SLBCSP_ENCODEDMSG_H)
  8. #define SLBCSP_ENCODEDMSG_H
  9. #include "RsaKey.h"
  10. #include "Blob.h"
  11. class EncodedMessage
  12. {
  13. public:
  14. // Types
  15. // C'tors/D'tors
  16. EncodedMessage(Blob const &rMessage,
  17. RsaKey::Type ktOperation,
  18. Blob::size_type cIntendedEncodingLength);
  19. ~EncodedMessage();
  20. // Operators
  21. // Operations
  22. // Access
  23. Blob
  24. Value() const;
  25. // Predicates
  26. static bool
  27. IsMessageLengthValid(Blob::size_type cMessageLength,
  28. Blob::size_type cIntendedEncodingLength);
  29. protected:
  30. // Types
  31. // C'tors/D'tors
  32. // Operators
  33. // Operations
  34. // Access
  35. // Predicates
  36. // Variables
  37. private:
  38. // Types
  39. // C'tors/D'tors
  40. // Operators
  41. void
  42. Pad(RsaKey::Type ktOperation,
  43. Blob::size_type cRequiredPadLength);
  44. // Operations
  45. // Access
  46. // Predicates
  47. // Variables
  48. Blob m_blob;
  49. };
  50. #endif // SLBCSP_ENCODEDMSG_H