Commit bd3847df authored by DanmeiChen's avatar DanmeiChen

merge dev_sha256 for algorithm

parent 335afcef
......@@ -215,7 +215,7 @@ void AuthDbBackend::createCachedAccount(const std::string &user, const std::stri
string AuthDbBackend::syncSha256(const char* input,size_t size){
uint8_t a1buf[size];
int di;
size_t di;
char out[size*2+1];
bctbx_sha256((const unsigned char*)input, strlen(input),size, a1buf);
for (di = 0; di < size; ++di)
......@@ -226,7 +226,7 @@ string AuthDbBackend::syncSha256(const char* input,size_t size){
string AuthDbBackend::syncMd5(const char* input,size_t size){
uint8_t a1buf[size];
int di;
size_t di;
char out[size*2+1];
bctbx_md5((const unsigned char*)input, strlen(input), a1buf);
for (di = 0; di < size; ++di)
......
......@@ -53,7 +53,7 @@ struct auth_mod_size {
auth_plugin_t plug[1];
};
void flexisipSha256(char* input, size_t size, uint8_t* a1buf, char* out){
int di;
size_t di;
bctbx_sha256((const unsigned char*)input, strlen(input),size, a1buf);
for (di = 0; di < size; ++di)
sprintf(out + di * 2, "%02x", a1buf[di]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment