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:
How to fill a buffer with random bytes using Cryptography API Functions
CryptGenRandom
..msdn    Add comment     W32 Constants      Translate this page
Fills a buffer with cryptographically random bytes.
Code examples:
How to fill a buffer with random bytes using Cryptography API Functions
Declaration:
BOOL WINAPI CryptGenRandom(
    HCRYPTPROV hProv,
    DWORD dwLen,
    BYTE* pbBuffer
);
FoxPro declaration:
DECLARE INTEGER CryptGenRandom IN advapi32;
    INTEGER hProv,;
    LONG dwLen,;
    STRING @pbBuffer
Parameters:
hProv
[in] Handle of a cryptographic service provider (CSP) created by a call to CryptAcquireContext.

dwLen
[in] Number of bytes of random data to be generated.

pbBuffer
[in, out] Buffer to receive the returned data.
Return value:
If the function succeeds, the return value is nonzero (TRUE).
My comment:
The data produced by this function is cryptographically random. It is far more random than the data generated by the typical random number generator such as the one shipped with your C compiler.
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-05-04 19:29:16
Modified: 2006-05-04 19:31:47
Visited in last 7 days: 14
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.80.137.168)
2 sec.Function: 'GdipGetImageRawFormat'
5 sec.
Function group: 'Menu'
8 sec.Function: 'CreatePopupMenu'
11 sec.Function: 'OpenSemaphore'
14 sec.Function: 'CryptReleaseContext'
18 sec.Function: 'SHEmptyRecycleBin'
21 sec.Function: 'accept'
24 sec.
Function group: 'Cryptography Reference'
28 sec.Function: 'GetTextAlign'
31 sec.Function: 'GetDiskFreeSpaceEx'
Google
Advertise here!