SmartFTP FTP Library
ISSHKeyBlobHelper Interface Reference

Utility interface for extracting the raw SSH public key blob from a key object. More...

import "sfFTPLib.idl";

Public Member Functions

HRESULT GetPublicKeyBlob ([in] IKey *key, [out, retval] VARIANT *retval)
 serialized the public key into the standard SSH binary blob format.

Detailed Description

Utility interface for extracting the raw SSH public key blob from a key object.

The Context: In the SSH protocol (RFC 4253), public keys are transmitted as a specific binary structure often called a "Blob". This structure consists of length-prefixed fields (e.g., algorithm name, exponent, modulus).

Usage: Use this interface when you need the raw binary representation of a public key, for example:

  • To generate the fingerprint of the key (MD5 or SHA256 hash of the blob).
  • To construct an authorized_keys entry (Base64 encoding the blob).
  • To perform low-level SSH handshake operations.

Member Function Documentation

◆ GetPublicKeyBlob()

HRESULT ISSHKeyBlobHelper::GetPublicKeyBlob ( [in] IKey * key,
[out, retval] VARIANT * retval )

serialized the public key into the standard SSH binary blob format.

The Output: Returns a VARIANT containing a SafeArray of bytes (VT_ARRAY | VT_UI1).

Blob Structure (Example for RSA):

  1. String: "ssh-rsa"
  2. MPINT: Public Exponent (e)
  3. MPINT: Modulus (n)
Parameters
[in]keyThe source IKey object containing the public key material.
[out]retvalReceives the binary blob data as a byte array.

The documentation for this interface was generated from the following file: