Using Win32 functions in Visual FoxPro Image Gallery
Cryptography Reference
..msdn
CertCloseStore
CertFindCertificateInStore
CertFreeCertificateContext
CertOpenSystemStore
CryptAcquireContext
CryptBinaryToString
CryptCreateHash
CryptDecrypt
CryptDeriveKey
CryptDestroyHash
CryptDestroyKey
CryptEncrypt
CryptEnumProviders
CryptEnumProviderTypes
CryptExportKey
CryptGenKey
CryptGenRandom
CryptGetDefaultProvider
CryptGetHashParam
CryptGetKeyParam
CryptGetProvParam
CryptHashData
CryptImportKey
CryptProtectData
CryptReleaseContext
CryptStringToBinary
CryptUnprotectData
WinVerifyTrust
Code examples:
CryptoAPI: Collection of Providers class
Generating random cryptographic keys
CryptGenKey
..msdn    Add comment     W32 Constants      Translate this page
Generates a random cryptographic session key or a public/private key pair. A handle to the key or key pair is returned in phKey. This handle can then be used as needed with any CryptoAPI function that requires a key handle.
Code examples:
Generating random cryptographic keys
CryptoAPI: Collection of Providers class
Declaration:
BOOL WINAPI CryptGenKey(
    HCRYPTPROV hProv,
    ALG_ID Algid,
    DWORD dwFlags,
    HCRYPTKEY* phKey
);
FoxPro declaration:
DECLARE INTEGER CryptGenKey IN advapi32;
    INTEGER   hProv,;
    INTEGER   Algid,;
    INTEGER   dwFlags,;
    INTEGER @ phKey

Parameters:
hProv
[in] Handle to a cryptographic service provider (CSP) created by a call to CryptAcquireContext.

Algid
[in] A ALG_ID structure that identifies the algorithm for which the key is to be generated.

dwFlags
[in] Specifies the type of key generated.

phKey
[out] Address to which the function copies the handle of the newly generated key.
Return value:
If the function succeeds, the return value is nonzero (TRUE).
My comment:
When you have finished using the key, delete the handle to the key by calling the CryptDestroyKey function.
Word Index links for the CryptGenKey :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-08-09 21:34:50
Modified: 2004-08-09 21:41:56
Visited in last 7 days: 8
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.111.111)
26 sec.Function: 'getnameinfo'
Function group: 'Windows Sockets 2 (Winsock)'
Google
Advertise here!