예제 #1
0
 private static DsaPublicKey readDsaX509Certificate(PublicKey publicKey) throws KeyczarException {
   DSAPublicKey jcePublicKey = (DSAPublicKey) publicKey;
   DsaPublicKey key = new DsaPublicKey();
   key.set(
       jcePublicKey.getY(),
       jcePublicKey.getParams().getP(),
       jcePublicKey.getParams().getQ(),
       jcePublicKey.getParams().getG());
   return key;
 }
예제 #2
0
 static DsaPublicKey read(String input) throws KeyczarException {
   DsaPublicKey key = Util.gson().fromJson(input, DsaPublicKey.class);
   key.init();
   return key;
 }