Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

DataFlex Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA Encryption
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(DataFlex) Load PuTTY Private Key

Loads a PuTTY private key into an SSH key object.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoSb
    Boolean iBCrlf
    Handle hoSshKey
    Boolean iSuccess
    String sTemp1

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSb
    If (Not(IsComObjectCreated(hoSb))) Begin
        Send CreateComObject of hoSb
    End
    Move True To iBCrlf
    Get ComAppendLine Of hoSb "PuTTY-User-Key-File-2: ssh-rsa" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "Encryption: aes256-cbc" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "Comment: rsa-key-20161121" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "Public-Lines: 6" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "AAAAB3NzaC1yc2EAAAABJQAAAQEArIVxZTGYjqqNegJeMqgZzXKuX3YtxmD4DPnQ" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "K01SXoR9UA4wl6RJK5FGonI5spVnddr6HJny0eY5/RmV1dyL0fNdH2pfnHHoTd9B" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "uXG0PcTn4BqJFlybC6NNaGaByqpNPaOgjJIMHXTaeCuDuzwP02f3UKSfLAFdvUNP" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "fX3yrMRabjVcHJpgUn535Y9Y3ZphSFssiElLpp1vo6QLsdiAl0wgU4HLw9Dfg8sh" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "p3zgAufYUUIx2HChITJ7OO/PH5GEbPvJFbYH4Wx33GEe56JCF9QxxDCqNxsPMrvu" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "mqkSIPIELFl5zVYSFD9PiL8RZQcPJGq5zbF9+szsS/6DSH8biw==" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "Private-Lines: 14" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "SVqUm9zBUN6zaAaUY6TLnIXAhxqv4s1UhzukcN7Ns0Fs1EqdDP4nVMKgmiDxHaAj" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "ucb1PLv7uj2eGt69E+HKH4AC2LtJZNH4qLw+p8QKqdN79oRAMHwtS4cU88eeQ91t" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "2W3wzmTzvYFlE6VbUr3bNl3f68OCQHz+7YJuL8g0eclNuveHB/VmBqnek1LL/cRY" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "wmk8wyzHRl7X8fyjGX0PiOPyVwXBDJFNjjKAdrRCRS0Cc4PWAb/18qrA9ApArQVk" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "a5miOMfrXFF2Vg3JyNgfdDilNKkry9x5oTtfueZkFgu/6pofP5qrTstr+BmB16mu" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "MxcDRF+jOm9XvU1OnrzQ9rBzuaHEfhSHqlKyMGTDuzRtNyxlDBgK4DaZ2z1FJQGF" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "63p36KgVqx571PUJ8P/28VUb6s/OtXcjhxxvhC8Eo0wrTdjzDiX+IovdjOhWgn4v" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "xugaYocotTbhqq+O1w9xYtmG8fP921+TIpHzCkE8QTJzLJ40pemKZ+TAOmhb0OUQ" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "jemqmRohcxx7NEoZ0TsoAe6i+GQJ2cEE7LcNcSX3V66AkyTsTieqk1nSxyHyoF+l" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "rTaVOhFM5H8Etzv94SP3c1if3Qa9cmZaEmfaqrS94bzX+OY/zRIFweT0BeMo3Uac" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "fP6gBDBiLYZeRURcx0mYRdNYlssaKoYLA6c7F3ggo34VfgD6LP+ZYnG8yAXGXSPr" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "lgrfdg/szqSsOKVdkoGTkVy+BgrhITnFIs8TLZsrtSEPmXjEa+QvdP6FPsyN5u6P" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "8s0i8EC0KT0YA77Ps29DEU3fxsXVSc9Xd9qdiWfJ0ce2hOsTwxL1gxtXUKP4xCzm" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "oXaWLFajiws2EjgBbwREj12v0I2N4xrpf/PeJq22EvWLYm9H94DdFrkm0b4p6Kmu" iBCrlf To iSuccess
    Get ComAppendLine Of hoSb "Private-MAC: ef04289f158f498b8050e19f1630b4764fe64ab9" iBCrlf To iSuccess

    Get Create (RefClass(cComChilkatSshKey)) To hoSshKey
    If (Not(IsComObjectCreated(hoSshKey))) Begin
        Send CreateComObject of hoSshKey
    End

    //  Must specify a password for this PuTTY private key because it is encrypted.
    Set ComPassword Of hoSshKey To "secret"

    Get ComGetAsString Of hoSb To sTemp1
    Get ComFromPuttyPrivateKey Of hoSshKey sTemp1 To iSuccess
    If (iSuccess <> True) Begin
        Get ComLastErrorText Of hoSshKey To sTemp1
        Showln sTemp1
        Showln "Failed."
    End

    Showln "success = " iSuccess


End_Procedure

 

© 2000-2019 Chilkat Software, Inc. All Rights Reserved.