DigestMd5Mechanism.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace FastReport.Messaging.Authentication.Sasl
  5. {
  6. /// <summary>
  7. /// The DIGEST-MD5 SASL authentication mechanism.
  8. /// </summary>
  9. public class DigestMd5Mechanism : SaslMechanism
  10. {
  11. #region Constants
  12. /// <summary>
  13. /// The mechanism name.
  14. /// </summary>
  15. public const string MECHANISM_NAME = "DIGEST-MD5";
  16. #endregion // Constants
  17. #region Constructors
  18. /// <summary>
  19. /// Initializes a new instance of the <see cref="DigestMd5Mechanism"/> class.
  20. /// </summary>
  21. /// <param name="username">The username.</param>
  22. /// <param name="password">The user's password.</param>
  23. public DigestMd5Mechanism(string username, string password)
  24. {
  25. Name = MECHANISM_NAME;
  26. Username = username;
  27. Password = password;
  28. }
  29. #endregion // Constructors
  30. #region Protected Methods
  31. /// <inheritdoc/>
  32. protected override byte[] ComputeResponse(byte[] challenge)
  33. {
  34. throw new Exception("The method or operation is not implemented.");
  35. }
  36. #endregion // Protected Methods
  37. }
  38. }