* sixbit_from_b64 - maps a base64-alphabet character to its 6-bit value * @param maps A base 64 maps structure (see base64_init_maps) * @param sixbit Six-bit value to map * @return a six-bit value */
| 26 | * @return a six-bit value |
| 27 | */ |
| 28 | static int8_t sixbit_from_b64(const base64_maps_t *maps, |
| 29 | const unsigned char b64letter) |
| 30 | { |
| 31 | int8_t ret; |
| 32 | |
| 33 | ret = maps->decode_map[(unsigned char)b64letter]; |
| 34 | if (ret == (int8_t)'\xff') { |
| 35 | errno = EDOM; |
| 36 | return -1; |
| 37 | } |
| 38 | |
| 39 | return ret; |
| 40 | } |
| 41 | |
| 42 | bool base64_char_in_alphabet(const base64_maps_t *maps, const char b64char) |
| 43 | { |
no outgoing calls