SmartFTP FTP Library
Example

C++

#import "libid:7A3A786C-EB8C-43b3-BC10-8D09ACF5D195"
#include <atlcom.h>
CComPtr<sfFTPLib::IOpenSSLKey> pRSA;
if(SUCCEEDED(pRSA.CoCreateInstance(__uuidof(sfFTPLib::OpenSSLKey))))
{
  pRSA->Initialize(sfFTPLib::ftpKeyAlgoRSA);
  DWORD t0 = ::GetTickCount();
  int bits = 2048;
  TRACE(_T("Generating %d bits RSA Key\n"), nBits);
  pRSA->Generate(bits);
  TRACE(_T("Key generation took %d ms\n"), ::GetTickCount() - t0);
}
Copyright (c) by SmartSoft Ltd. All rights reserved.