authentikat-jwt
authentikat-jwt copied to clipboard
Pass in keys as byte arrays instead of strings
Right now, at least for HMac, the String
key is converted to Array[Byte]
(https://github.com/jasongoodwin/authentikat-jwt/blob/master/src/main/scala/authentikat/jwt/JsonWebSignature.scala#L47) using String.asBytes
(http://docs.oracle.com/javase/8/docs/api/java/lang/String.html#getBytes--).
This is kind of confusing, and unless I'm missing something is platform-dependent and reduces the key space to only those keys that are valid strings in the default encoding of the platform.
I'll try to look at this item this week. Thanks for the feedback.
Can you please check and merge the PR?