I think you've got a simple typo in you code -- in SQLFORM.factory, you have
a ')' at the end of the Field line, so your 'requires' ends up being a
SQLFORM.factory argument instead of a Field argument. It should be:
form=SQLFORM.factory(
Field('card_number','string',comment='with dashes',
requires=CRYPT(auth.settings.hmac_key)))
When I try the above, CRYPT works fine for me.
Anthony
On Wednesday, May 11, 2011 11:02:17 PM UTC-4, niknok wrote:
> here's the code I used.
> http://pastie.org/1891534
>
> what's weird is that I know that CRYPT works in my other apps, it's
> just in this particular controller that it isn't working right.
>
> And in my case, my logical test is "==" and not "!=". My problem is
> the unecrypted
> variable...