title: ObjectDisposedException When using MD5 ComputeHash
body: <p>I am getting ObjectDisposedException: Safe handle has been closed.</p>
  
  <p>This is my code:</p>
  
  <p>I am trying to create an interface and implementing class that will enable me to get a string, attach to it a known key, compute MD5 hash for this string and the key, and return the computed hash:</p>
  
  <pre><code>public interface ISignService
  {
      string GetSignature(string str);
  }
  
  public class SignService : ISignService
  {
      private readonly ISignSettings _signSettings;
      private readonly HashAlgorithm _hashAlgo;
  
  
      public SignService(ISignSettings signSettings)
      {
          _signSettings = signSettings;
          _hashAlgo = MD5.Create();
      }
  
      public string GetSignature(string str)
      {
          var strWithKey = str + _signSettings.EncryptionKey;
  
          var hashed = _hashAlgo.ComputeHash(Encoding.UTF8.GetBytes(strWithKey));
  
          return hashed.ToHexString();
      }
  }
  </code></pre>
  
  <p>Thanks</p>