* Author: Hannes Reinecke <hare@suse.de>
*/
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
int base64_encode(const unsigned char *src, int srclen, char *dst)
{
int i, bits = 0;
- u_int32_t ac = 0;
+ uint32_t ac = 0;
char *cp = dst;
for (i = 0; i < srclen; i++) {
*/
int base64_decode(const char *src, int srclen, unsigned char *dst)
{
- u_int32_t ac = 0;
+ uint32_t ac = 0;
int i, bits = 0;
unsigned char *bp = dst;
return NULL;
}
crc = crc32(crc, decoded_key, decoded_len);
- key_crc = ((u_int32_t)decoded_key[decoded_len]) |
- ((u_int32_t)decoded_key[decoded_len + 1] << 8) |
- ((u_int32_t)decoded_key[decoded_len + 2] << 16) |
- ((u_int32_t)decoded_key[decoded_len + 3] << 24);
+ key_crc = ((uint32_t)decoded_key[decoded_len]) |
+ ((uint32_t)decoded_key[decoded_len + 1] << 8) |
+ ((uint32_t)decoded_key[decoded_len + 2] << 16) |
+ ((uint32_t)decoded_key[decoded_len + 3] << 24);
if (key_crc != crc) {
nvme_msg(NULL, LOG_ERR, "CRC mismatch (key %08x, crc %08x)",
key_crc, crc);