mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-16 21:29:20 +02:00
#75, base32 decode uppercase
This commit is contained in:
parent
d5deccb354
commit
1c8f6e522f
|
@ -26,6 +26,8 @@
|
||||||
|
|
||||||
static const char cb32[] =
|
static const char cb32[] =
|
||||||
"abcdefghijklmnopqrstuvwxyz012345";
|
"abcdefghijklmnopqrstuvwxyz012345";
|
||||||
|
static const char cb32_ucase[] =
|
||||||
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ012345";
|
||||||
static unsigned char rev32[128];
|
static unsigned char rev32[128];
|
||||||
|
|
||||||
static int base32_decode(void *, size_t *, const char *, size_t);
|
static int base32_decode(void *, size_t *, const char *, size_t);
|
||||||
|
@ -80,6 +82,8 @@ base32_reverse_init()
|
||||||
for (i = 0; i < 32; i++) {
|
for (i = 0; i < 32; i++) {
|
||||||
c = cb32[i];
|
c = cb32[i];
|
||||||
rev32[(int) c] = i;
|
rev32[(int) c] = i;
|
||||||
|
c = cb32_ucase[i];
|
||||||
|
rev32[(int) c] = i;
|
||||||
}
|
}
|
||||||
reverse_init = 1;
|
reverse_init = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue