cosmetics
This commit is contained in:
parent
8a1f63b557
commit
ce06064fcf
3 changed files with 20 additions and 15 deletions
|
|
@ -1,8 +1,9 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
|
||||
// Declare the function from sha0.c
|
||||
void Internal_Sha0(unsigned char *dest, const unsigned char *src, const unsigned int size);
|
||||
const UCHAR* MY_SHA0_hash(const void* data, int len, UCHAR* digest);
|
||||
|
||||
#define SHA0_DIGEST_SIZE 20
|
||||
|
||||
|
|
@ -12,8 +13,8 @@ int main(int argc, char **argv) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
unsigned char digest[SHA0_DIGEST_SIZE];
|
||||
Internal_Sha0(digest, (const unsigned char *)argv[1], strlen(argv[1]));
|
||||
UCHAR digest[SHA0_DIGEST_SIZE];
|
||||
MY_SHA0_hash((const UCHAR *)argv[1], strlen(argv[1]), digest);
|
||||
|
||||
for (int i = 0; i < SHA0_DIGEST_SIZE; i++) {
|
||||
printf("%02x", digest[i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue