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 perform Base64 encoding/decoding using Cryptography API Functions
CryptBinaryToString
..msdn    Add comment     W32 Constants      Translate this page
Converts an array of bytes into a formatted string.
Code examples:
How to perform Base64 encoding/decoding using Cryptography API Functions
Declaration:
BOOL WINAPI CryptBinaryToString(
    const BYTE* pbBinary,
    DWORD cbBinary,
    DWORD dwFlags,
    LPTSTR pszString,
    DWORD* pcchString
);
FoxPro declaration:
DECLARE INTEGER CryptBinaryToString IN Crypt32;
    STRING @pbBinary,;
    LONG cbBinary,;
    LONG dwFlags,;
    STRING @pszString,;
    LONG @pcchString
Parameters:
pbBinary
[in] A pointer to the array of bytes to be converted into a string.

cbBinary
[in] The number of elements in the pbBinary array.

dwFlags
[in] Specifies the format of the resulting formatted string.

pszString
[in] A pointer to a buffer that receives the converted string.

pcchString
[in, out] A pointer to a DWORD variable that contains the size, in TCHARs, of the pszString buffer.
Return value:
If the function succeeds, the function returns nonzero (TRUE).
Usage:
nFlags=1  && base64
CryptBinaryToString( @cSrc, LEN(cSrc), m.nFlags,;
    @cDst, @nBufsize )
My comment:
Can be used for base64 encoding.

See also: CryptStringToBinary

This is the output of CryptBinaryToString with dwFlags set to CRYPT_STRING_HEXASCIIADDR (0x000b).
Word Index links for the CryptBinaryToString :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-05-04 21:20:13
Modified: 2010-04-06 10:39:03
Visited in last 7 days: 22
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.198.54.142)
17 sec.
Function group: 'Terminal Services'
34 sec.Function: 'CeFindNextDatabaseEx'
Function group: 'Remote Application Programming (RAPI)'
50 sec.Function: 'DeleteFile'
Function group: 'File Management'
1.13 min.
Function group: 'Color'
1.42 min.Function: 'CeCreateDirectory'
Function group: 'Remote Application Programming (RAPI)'
2.02 min.Function: 'GetForegroundWindow'
2.37 min.
Function group: 'Time'
2.68 min.Function: 'CeReadFile'
Function group: 'Remote Application Programming (RAPI)'
3.05 min.Function: 'FlushFileBuffers'
Function group: 'File Management'
3.38 min.Function: 'CeGetVersionEx'
Function group: 'Remote Application Programming (RAPI)'
Google
Advertise here!