authentikat-jwt icon indicating copy to clipboard operation
authentikat-jwt copied to clipboard

Pass in keys as byte arrays instead of strings

Open raboof opened this issue 8 years ago • 2 comments

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.

raboof avatar Apr 22 '16 11:04 raboof

I'll try to look at this item this week. Thanks for the feedback.

jasongoodwin avatar Jul 17 '16 06:07 jasongoodwin

Can you please check and merge the PR?

xissy avatar Apr 13 '17 17:04 xissy