Example #1
0
 public static KeyMetadata read(String jsonString) {
   KeyMetadata kmd = (KeyMetadata) Util.gson().fromJson(jsonString, KeyMetadata.class);
   for (KeyVersion version : kmd.getVersions()) {
     kmd.versionMap.put(Integer.valueOf(version.getVersionNumber()), version);
   }
   return kmd;
 }
Example #2
0
 static DsaPublicKey read(String input) throws KeyczarException {
   DsaPublicKey key = Util.gson().fromJson(input, DsaPublicKey.class);
   key.init();
   return key;
 }
Example #3
0
 public String toString() {
   return Util.gson().toJson((Object) this);
 }