예제 #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;
 }
예제 #2
0
 static DsaPublicKey read(String input) throws KeyczarException {
   DsaPublicKey key = Util.gson().fromJson(input, DsaPublicKey.class);
   key.init();
   return key;
 }
예제 #3
0
 public String toString() {
   return Util.gson().toJson((Object) this);
 }