Changeset 772 in openpam for trunk/lib


Ignore:
Timestamp:
Mar 9, 2014, 11:45:05 AM (7 years ago)
Author:
Dag-Erling Smørgrav
Message:

Switch from uint8_t to char.

Location:
trunk/lib/liboath
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/liboath/oath_base32.c

    r771 r772  
    4545    "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
    4646
    47 static const uint8_t b32dec[256] = {
     47static const char b32dec[256] = {
    4848        ['A'] =  0, ['B'] =  1, ['C'] =  2, ['D'] =  3,
    4949        ['E'] =  4, ['F'] =  5, ['G'] =  6, ['H'] =  7,
     
    7171 */
    7272int
    73 base32_enc(const uint8_t *in, size_t ilen, char *out, size_t *olen)
     73base32_enc(const char *in, size_t ilen, char *out, size_t *olen)
    7474{
    7575        uint64_t bits;
     
    144144 */
    145145int
    146 base32_dec(const char *in, size_t ilen, uint8_t *out, size_t *olen)
     146base32_dec(const char *in, size_t ilen, char *out, size_t *olen)
    147147{
    148148        size_t len;
  • trunk/lib/liboath/oath_base64.c

    r771 r772  
    4646    "0123456789+/";
    4747
    48 static const uint8_t b64dec[256] = {
     48static const char b64dec[256] = {
    4949        ['A'] =  0, ['B'] =  1, ['C'] =  2, ['D'] =  3,
    5050        ['E'] =  4, ['F'] =  5, ['G'] =  6, ['H'] =  7,
     
    7070 */
    7171int
    72 base64_enc(const uint8_t *in, size_t ilen, char *out, size_t *olen)
     72base64_enc(const char *in, size_t ilen, char *out, size_t *olen)
    7373{
    7474        uint32_t bits;
     
    127127 */
    128128int
    129 base64_dec(const char *in, size_t ilen, uint8_t *out, size_t *olen)
     129base64_dec(const char *in, size_t ilen, char *out, size_t *olen)
    130130{
    131131        size_t len;
  • trunk/lib/liboath/oath_key.c

    r758 r772  
    117117        }
    118118        uri = tmp;
    119         if (base32_enc(key->key, key->keylen, uri + urilen, &kslen) != 0) {
     119        if (base32_enc((char *)key->key, key->keylen, uri + urilen, &kslen) != 0) {
    120120                free(uri);
    121121                return (NULL);
  • trunk/lib/liboath/oath_key_from_uri.c

    r758 r772  
    108108                                goto invalid;
    109109                        key->keylen = sizeof key->key;
    110                         if (base32_dec(q, r - q, key->key, &key->keylen) != 0)
     110                        if (base32_dec(q, r - q, (char *)key->key, &key->keylen) != 0)
    111111                                goto invalid;
    112112                        if (base32_enclen(key->keylen) != (size_t)(r - q))
Note: See TracChangeset for help on using the changeset viewer.