search for: bb_hexdigits_upcase

Displaying 1 result from an estimated 1 matches for "bb_hexdigits_upcase".

2017 Jul 01
0
[PATCH] Add new hash.c32 module
...ight (C) 2003 Erik Andersen + * Copyright (C) 2010 Denys Vlasenko + * Copyright (C) 2012 Pascal Bellard + * + * Licensed under GPLv2 or later + */ + +#define ALIGN1 + +/* Emit a string of hex representation of bytes */ +static char* bin2hex(char *p, int count, const void *in) +{ + static const char bb_hexdigits_upcase[] ALIGN1 = "0123456789abcdef"; + const char *cp = (const char *) in; + while (count) { + unsigned char c = *cp++; + /* put lowercase hex digits */ + *p++ = bb_hexdigits_upcase[c >> 4]; + *p++ = bb_hexdigits_upcase[c & 0xf]; + count--; + } + return p; +} + +/* + * Copyright...