public DSAPublicKey getPublicKey() { return new DSAPublicKey(p, q, g, y); } }
public DSAPublicKey getPublicKey() { return new DSAPublicKey(p, q, g, y); } }
public DSAPublicKey getPublicKey() { return new DSAPublicKey(p, q, g, y); } }
public static DSAPublicKey decodeSSHDSAPublicKey(byte[] key) throws IOException { TypesReader tr = new TypesReader(key); String key_format = tr.readString(); if (key_format.equals("ssh-dss") == false) throw new IllegalArgumentException("This is not a ssh-dss public key!"); BigInteger p = tr.readMPINT(); BigInteger q = tr.readMPINT(); BigInteger g = tr.readMPINT(); BigInteger y = tr.readMPINT(); if (tr.remain() != 0) throw new IOException("Padding in DSA public key!"); return new DSAPublicKey(p, q, g, y); }
@Deprecated public static DSAPublicKey decodeSSHDSAPublicKey(byte[] key) throws IOException { final TypesReader tr = new TypesReader(key); final String key_format = tr.readString(); if (!key_format.equals("ssh-dss")) { throw new IOWarningException("Unsupported key format found '" + key_format + "' while expecting ssh-dss"); } final BigInteger p = tr.readMPINT(); final BigInteger q = tr.readMPINT(); final BigInteger g = tr.readMPINT(); final BigInteger y = tr.readMPINT(); if (tr.remain() != 0) { throw new IOException("Padding in DSA public key!"); } return new DSAPublicKey(p, q, g, y); }
public static DSAPublicKey decodeSSHDSAPublicKey(byte[] key) throws IOException { final TypesReader tr = new TypesReader(key); final String key_format = tr.readString(); if (!key_format.equals("ssh-dss")) { throw new IOWarningException("Unsupported key format found '" + key_format + "' while expecting ssh-dss"); } final BigInteger p = tr.readMPINT(); final BigInteger q = tr.readMPINT(); final BigInteger g = tr.readMPINT(); final BigInteger y = tr.readMPINT(); if (tr.remain() != 0) { throw new IOException("Padding in DSA public key!"); } return new DSAPublicKey(p, q, g, y); }