title: System.Security.Cryptography.CryptographicException
body: <p>When I try to encrypt &amp; decrypt sample text in my WebAPI project the message encrypt successfully but in decryption it dose not work .
  I have already set in my startup.cs =>  services.AddDataProtection();
  Here is error message:</p>
  
  <blockquote>
    <p>System.Security.Cryptography.CryptographicException: The provided payload cannot be decrypted because it was not protected with this protection provider.</p>
  </blockquote>
  
  <pre><code>[Route("api/[controller]")]
  [ApiController]
  public class SecurityController : ControllerBase
  {
      private readonly IDataProtector _protector;
      public SecurityController(IDataProtectionProvider protectionProvider)
      {
          _protector = protectionProvider.CreateProtector("SampleKey");
      }
  
  
      [HttpGet]
      public IActionResult Get()
      {
          string text = "sample text";
          string protectedtext = _protector.Protect(text);
          string unprotectedtext = _protector.Unprotect(text);
          return Ok(new { text = text, Protected = protectedtext, unprotexted = unprotectedtext });
      }
  }
  </code></pre>