Client-code-dll
From SBOL Project
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.