Пример #1
0
static DWORD
userinfo_hash(void* pKey, DWORD dwIndex, void* data)
{
    switch ((USERINFO_KEY) dwIndex)
    {
    case USERINFO_UID:
    case USERINFO_GID:
        return *(DWORD*) pKey;
    case USERINFO_SID:
    case USERINFO_UPN:
        return generic_hash(pKey, strlen((const char*) pKey));
    }

    return 0;
}
Пример #2
0
void
octstr_whirlpool(octstr_t *dst, octstr_t *src)
{
	generic_hash(dst, src, whirlpool, 64);
}
Пример #3
0
void
octstr_sha256(octstr_t *dst, octstr_t *src)
{
	generic_hash(dst, src, sha256, 32);
}
Пример #4
0
void
octstr_sha1(octstr_t *dst, octstr_t *src)
{
	generic_hash(dst, src, sha1, 20);
}
Пример #5
0
void
octstr_md5(octstr_t *dst, octstr_t *src)
{
	generic_hash(dst, src, md5, 16);
}