public RSAPublicKey getPublicKey() { return new RSAPublicKey(e, n); } }
public RSAPublicKey getPublicKey() { return new RSAPublicKey(e, n); } }
public RSAPublicKey getPublicKey() { return new RSAPublicKey(e, n); }
public static RSAPublicKey decodeSSHRSAPublicKey(byte[] key) throws IOException { TypesReader tr = new TypesReader(key); String key_format = tr.readString(); if (key_format.equals("ssh-rsa") == false) throw new IllegalArgumentException("This is not a ssh-rsa public key"); BigInteger e = tr.readMPINT(); BigInteger n = tr.readMPINT(); if (tr.remain() != 0) throw new IOException("Padding in RSA public key!"); return new RSAPublicKey(e, n); }
@Deprecated public static RSAPublicKey decodeSSHRSAPublicKey(byte[] key) throws IOException { final TypesReader tr = new TypesReader(key); final String key_format = tr.readString(); if (!key_format.equals("ssh-rsa")) { throw new IOWarningException("Unsupported key format found '" + key_format + "' while expecting ssh-rsa"); } final BigInteger e = tr.readMPINT(); final BigInteger n = tr.readMPINT(); if (tr.remain() != 0) { throw new IOException("Padding in RSA public key!"); } return new RSAPublicKey(e, n); }
public static RSAPublicKey decodeSSHRSAPublicKey(byte[] key) throws IOException { final TypesReader tr = new TypesReader(key); final String key_format = tr.readString(); if (!key_format.equals("ssh-rsa")) { throw new IOWarningException("Unsupported key format found '" + key_format + "' while expecting ssh-rsa"); } final BigInteger e = tr.readMPINT(); final BigInteger n = tr.readMPINT(); if (tr.remain() != 0) { throw new IOException("Padding in RSA public key!"); } return new RSAPublicKey(e, n); }