title: How can I validate a Fernet token without using the key?
body: <p>I'm using the <code>cryptography.fernet</code> library to encrypt some small text, and when I receive that text on my server, I'd like to validate that it is actually valid cipher-text before making an RPC to decrypt it, so that my server can just return that the data is invalid. Is there some cheap way to do that, just to avoid cases of spam?</p>
  
  <p>For example, if this is my cyphertext: </p>
  
  <pre><code>&gt;&gt;&gt; k = Fernet.generate_key()
  &gt;&gt;&gt; f = Fernet(k)
  &gt;&gt;&gt; c = f.encrypt("misingnoglic@gmail.com")
  &gt;&gt;&gt; c
  'gAAAAABdCC4Z8fqgRu7fCv2e7cvPm46rMwTVmSJK6guR5vrnvjaCICXKI1cI-_qr3Cs_z602a4tS-sMYm_smSOzgwOJ8biVQDqlyyyt-iLcxQNCOmjBywwM='
  </code></pre>
  
  <p>Is there any cheap way to validate that the string beginning with gAAAA is valid? Or that the string 'abcde' would be invalid?</p>
  
  <p>Thanks!</p>