public byte[] getEncoded() throws SshException {
		ByteArrayWriter baw = new ByteArrayWriter();
		try {

			baw.writeString(getAlgorithm());
			baw.writeBigInteger(pubkey.getParams().getP());
			baw.writeBigInteger(pubkey.getParams().getQ());
			baw.writeBigInteger(pubkey.getParams().getG());
			baw.writeBigInteger(pubkey.getY());

			return baw.toByteArray();
		} catch (IOException ioe) {
			throw new SshException("Failed to encoded DSA key",
					SshException.INTERNAL_ERROR, ioe);
		} finally {
			try {
				baw.close();
			} catch (IOException e) {
			}
		}
	}
public byte [ ] getEncoded ( ) throws SshException { ByteArrayWriter baw = new ByteArrayWriter ( ) ; try { baw . writeString ( getAlgorithm ( ) ) ; baw . writeBigInteger ( pubkey . getParams ( ) . getP ( ) ) ; baw . writeBigInteger ( pubkey . getParams ( ) . getQ ( ) ) ; baw . writeBigInteger ( pubkey . getParams ( ) . getG ( ) ) ; baw . writeBigInteger ( pubkey . getY ( ) ) ; return baw . toByteArray ( ) ; } catch ( IOException ioe ) { throw new SshException ( "Failed to encoded DSA key" , SshException . INTERNAL_ERROR , ioe ) ; } finally { try { baw . close ( ) ; } catch ( IOException e ) { } } }
Encode the public key into a blob of binary data, the encoded result will
be passed into init to recreate the key.

@return an encoded byte array
@throws SshException
@todo Implement this com.sshtools.ssh.SshPublicKey method