changing encryption/decryption code to use enum classes rather than shady parsing techniques

pull/128/head
Mike Derryberry 2012-07-31 08:42:44 -04:00
parent a6ea0f3c9a
commit 5f80ebc89a
2 changed files with 23 additions and 2 deletions

View File

@ -19,8 +19,6 @@ public class Rsa extends AbstractJwk{
private String mod;
private String exp;
JsonObject object = new JsonObject();
public String getMod() {
return mod;
}

View File

@ -0,0 +1,23 @@
package org.mitre.jwt.encryption;
public enum JweAlgorithms {
//Key Derivation Function Values
CS256("256"),
CS384("384"),
CS512("512"),
//Encryption Method Values
A128GCM("GCM"),
A256GCM("GCM"),
A128CBC("CBC"),
A256CBC("CBC");
private final String value;
JweAlgorithms(String value) {
this.value = value;
}
}