* @throws AlgorithmNotSupportedException
*/
public static SshPrivateKey decodePrivateKey(byte[] encoded)
throws InvalidSshKeyException, AlgorithmNotSupportedException {
try {
ByteArrayReader bar = new ByteArrayReader(encoded);
String algorithm = bar.readString();
if (supportsKey(algorithm)) {
SshKeyPair pair = newInstance(algorithm);
return pair.decodePrivateKey(encoded);