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
CryptStringToBinary
..msdn    Add comment     W32 Constants      Translate this page
Converts a formatted string into an array of bytes.
Code examples:
How to perform Base64 encoding/decoding using Cryptography API Functions
Declaration:
BOOL WINAPI CryptStringToBinary(
    LPCTSTR pszString,
    DWORD cchString,
    DWORD dwFlags,
    BYTE* pbBinary,
    DWORD* pcbBinary,
    DWORD* pdwSkip,
    DWORD* pdwFlags
);

FoxPro declaration:
DECLARE INTEGER CryptStringToBinary IN crypt32;
    STRING @pszString,;
    LONG cchString,;
    LONG dwFlags,;
    STRING @pbBinary,;
    LONG @pcbBinary,;
    LONG pdwSkip,;
    LONG pdwFlags
Parameters:
pszString
[in] A pointer to a string that contains the formatted string to be converted.

cchString
[in] The number of characters of the formatted string to be converted, not including the terminating NULL character. If this parameter is zero, pszString is considered to be a null-terminated string.

dwFlags
[in] Indicates the format of the string to be converted.

pbBinary
[in] A pointer to a buffer that receives the returned sequence of bytes.

pcbBinary
[in, out] A pointer to a DWORD value that, on entry, contains the size, in bytes, of the pbBinary buffer.

pdwSkip
[out] A pointer to a DWORD value that receives the number of characters skipped to reach the beginning of the actual base64 or hex strings.

pdwFlags
[out] A pointer to a DWORD value that receives the flags actually used in the conversion.
Return value:
If the function succeeds, the return value is nonzero (TRUE).
Usage:
nFlags=CRYPT_STRING_BASE64  && 0x0001

CryptStringToBinary( @cSrc, LEN(m.cSrc),;
    nFlags, @cDst, @nBufsize, 0,0 )
My comment:
Can be used for base64 decoding.

See also: CryptBinaryToString
Word Index links for the CryptStringToBinary :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2006-05-04 21:25:34
Modified: 2010-04-06 10:38:41
Visited in last 7 days: 13
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.167.96.124)
2 sec.Function: 'GetForegroundWindow'
Function group: 'Window'
4 sec.Example: 'How to assemble an array of strings and pass it to external function'
56 sec.Function: 'SHGetFolderLocation'
1 day(s)Example: 'Accessing Adobe Reader 7.0 main menu from VFP application'
 Example: 'Enumerating the subkeys of a user-specific key'
 Example: 'How to delete a service object'
3 day(s)Function: 'ReadFile'
Function group: 'File Management'
 Function: 'ReleaseDC'
6 day(s)Example: 'How to create non-blocking Winsock server'
Language: 'C++'
 Example: 'Reading keys in the specified section of the Win.ini file'
Google
Advertise here!