hash_memory #265

Closed
opened 2017-08-10 10:30:32 -05:00 by phy0292 · 0 comments
phy0292 commented 2017-08-10 10:30:32 -05:00 (Migrated from github.com)

hash_memory(idx, NULL, 0, digest, &len);

If this call will be exception!
The following is better.

int hash_memory(int hash, const unsigned char *in, unsigned long inlen,
unsigned char *out, unsigned long *outlen)
{
if(in == NULL || inlen == 0 || out == NULL || outlen == 0)return 6;
......
}

hash_memory(idx, NULL, 0, digest, &len); If this call will be exception! The following is better. int hash_memory(int hash, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen) { if(in == NULL || inlen == 0 || out == NULL || outlen == 0)return 6; ...... }
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libtom/libtomcrypt#265
No description provided.