MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / toECGOSTPublicKey

Method toECGOSTPublicKey

src/main/java/core/org/xbill/DNS/DNSSEC.java:495–507  ·  view source on GitHub ↗
(KEYBase r, ECKeyInfo keyinfo)

Source from the content-addressed store, hash-verified

493 "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973");
494
495private static PublicKey
496toECGOSTPublicKey(KEYBase r, ECKeyInfo keyinfo) throws IOException,
497 GeneralSecurityException, MalformedKeyException
498{
499 DNSInput in = new DNSInput(r.getKey());
500
501 BigInteger x = readBigIntegerLittleEndian(in, keyinfo.length);
502 BigInteger y = readBigIntegerLittleEndian(in, keyinfo.length);
503 ECPoint q = new ECPoint(x, y);
504
505 KeyFactory factory = KeyFactory.getInstance("ECGOST3410");
506 return factory.generatePublic(new ECPublicKeySpec(q, keyinfo.spec));
507}
508
509private static PublicKey
510toECDSAPublicKey(KEYBase r, ECKeyInfo keyinfo) throws IOException,

Callers 1

toPublicKeyMethod · 0.95

Calls 3

getKeyMethod · 0.45
getInstanceMethod · 0.45

Tested by

no test coverage detected