progrium/pyjwt — Issue #5: keys cannot be binary?
Author: jkarneges
Created: 2011-12-12 03:30:27+00:00
State: open

encode() does some string conversions to the key which cause it to barf if a key contains non-ascii characters. Is there a reason to be treating the key as a string? Normally crypto operations should support the full bit range, and I don't see anything in the JWT spec that would forbid this.

Otherwise, if I want to support, say, 128-bit strength, I need to bloat it out into an ascii string that is longer than 16 bytes (e.g. a hex string of 32 chars).