Skip to content

Pass in keys as byte arrays instead of strings #24

@raboof

Description

@raboof

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions