|  | 
Chilkat  HOME  Android™  AutoIt  C  C#  C++  Chilkat2-Python  CkPython  Classic ASP  DataFlex  Delphi DLL  Go  Java  Node.js  Objective-C  PHP Extension  Perl  PowerBuilder  PowerShell  PureBasic  Ruby  SQL Server  Swift  Tcl  Unicode C  Unicode C++  VB.NET  VBScript  Visual Basic 6.0  Visual FoxPro  Xojo Plugin
| (Delphi DLL) SSH Key FingerprintGenerates a fingerprint for an SSH key. 
 uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, SshKey; ... procedure TForm1.Button1Click(Sender: TObject); var key: HCkSshKey; success: Boolean; keyStr: PWideChar; fingerprint: PWideChar; begin key := CkSshKey_Create(); // Load an SSH key from an encrypted OpenSSH-formatted private key: CkSshKey_putPassword(key,'secret'); // First load the PEM into a string: keyStr := CkSshKey__loadText(key,'privkey_openssh_encrypted.pem'); // Import into the SSH key object: success := CkSshKey_FromOpenSshPrivateKey(key,keyStr); if (success <> True) then begin Memo1.Lines.Add(CkSshKey__lastErrorText(key)); Exit; end; // Generate the fingerprint: fingerprint := CkSshKey__genFingerprint(key); Memo1.Lines.Add(fingerprint); // A sample fingerpring looks like this: // ssh-dss 2048 d0:5f:f7:d6:49:60:7b:50:19:f4:41:59:d4:1f:61:7 CkSshKey_Dispose(key); end; | ||||
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.