Granados.SSH2.SSH2UserAuthKey.FromSECSHStyleFile C# (CSharp) Method

FromSECSHStyleFile() public static method

public static FromSECSHStyleFile ( string filename, string passphrase ) : SSH2UserAuthKey
filename string
passphrase string
return SSH2UserAuthKey
        public static SSH2UserAuthKey FromSECSHStyleFile(string filename, string passphrase)
        {
            #if PODEROSA_KEYFORMAT
            PrivateKeyLoader loader = new PrivateKeyLoader(filename);
            KeyPair keyPair;
            string comment;
            loader.LoadSSH2PrivateKey(passphrase, out keyPair, out comment);
            return new SSH2UserAuthKey(keyPair, comment);
            #else
            return FromSECSHStyleStream(new FileStream(filename, FileMode.Open, FileAccess.Read), passphrase);
            #endif
        }