(DSAPublicKey key)
| 574 | } |
| 575 | |
| 576 | private static byte [] |
| 577 | fromDSAPublicKey(DSAPublicKey key) { |
| 578 | DNSOutput out = new DNSOutput(); |
| 579 | BigInteger q = key.getParams().getQ(); |
| 580 | BigInteger p = key.getParams().getP(); |
| 581 | BigInteger g = key.getParams().getG(); |
| 582 | BigInteger y = key.getY(); |
| 583 | int t = (p.toByteArray().length - 64) / 8; |
| 584 | |
| 585 | out.writeU8(t); |
| 586 | writeBigInteger(out, q); |
| 587 | writeBigInteger(out, p); |
| 588 | writePaddedBigInteger(out, g, 8 * t + 64); |
| 589 | writePaddedBigInteger(out, y, 8 * t + 64); |
| 590 | |
| 591 | return out.toByteArray(); |
| 592 | } |
| 593 | |
| 594 | private static byte [] |
| 595 | fromECGOSTPublicKey(ECPublicKey key, ECKeyInfo keyinfo) { |
no test coverage detected