Difference between revisions of "Client-code-dll"
(Created page with "= Functions = == csp_encrypt == Function is called inside the AuthDataCrypt/AuthDataDecrypt/AuthDataCryptDecrypt functions == csp_decrypt == Function is called inside the Auth...") |
|||
Line 14: | Line 14: | ||
Pass the decryption key and pointer to buffer to decrypt. SBOL uses "authgenki" as a key the client doesn't use this function but would be used by the server to check the password. For example:<br /> | Pass the decryption key and pointer to buffer to decrypt. SBOL uses "authgenki" as a key the client doesn't use this function but would be used by the server to check the password. For example:<br /> | ||
<code> | <code> | ||
+ | <div> | ||
char* decryptBuf;<br /> | char* decryptBuf;<br /> | ||
char encryptBuf[] = {ENCRYPTEDBUFFER};<br /> | char encryptBuf[] = {ENCRYPTEDBUFFER};<br /> | ||
decryptBuf = AuthDataDecrypt("authgenki",&encryptBuf[0]);<br /> | decryptBuf = AuthDataDecrypt("authgenki",&encryptBuf[0]);<br /> | ||
+ | </div> | ||
</code> | </code> | ||
== AuthDataCryptDecrypt == | == AuthDataCryptDecrypt == |
Revision as of 17:36, 26 October 2016
Contents
Functions
csp_encrypt
Function is called inside the AuthDataCrypt/AuthDataDecrypt/AuthDataCryptDecrypt functions
csp_decrypt
Function is called inside the AuthDataCrypt/AuthDataDecrypt/AuthDataCryptDecrypt functions
AuthDataCrypt
Pass the encryption key and pointer to buffer to encrypt. SBOL uses "authgenki" as a key. For example:
char* encryptBuf;
char decryptBuf[] = {"p","a","s","s","w","o","r","d","\0"};
encryptBuf = AuthDataCrypt("authgenki",&decryptBuf[0]);
AuthDataDecrypt
Pass the decryption key and pointer to buffer to decrypt. SBOL uses "authgenki" as a key the client doesn't use this function but would be used by the server to check the password. For example:
char* decryptBuf;
char encryptBuf[] = {ENCRYPTEDBUFFER};
decryptBuf = AuthDataDecrypt("authgenki",&encryptBuf[0]);
AuthDataCryptDecrypt
Untested but suspect it crypts the data and memcpy's to the pointers pushed to the function.
AuthDataDestroy
Pass the pointer to the encrypted buffer to this function to free the allocated memory.