LAR Library
1.14
|
conv.h
Go to the documentation of this file.
int convTxtToBcd(const char *txt, int maxtxt, uint8_t *bcd, int maxbcd)
Convert a string of decimal digits (or ISO PAN) to BCD.
int convIntToBufPad(uint64_t n, uint8_t *buf, int maxbuf)
Convert an integer to a sequence of bytes in big-endian ordering and with padding.
int convIntToBuf(uint64_t n, uint8_t *buf, int maxbuf)
Convert an integer to a sequence of bytes in big-endian ordering.
int convBufToHex(const uint8_t *buf, int nbuf, char *hex, int maxcnt)
Convert buffer to hexadecimal string.
int convIntToBcdPad(uint64_t n, uint8_t *bcd, int nibbles)
Convert Integer to BCD with left padding.
int convIntToTxtPad(uint64_t n, char *txt, int cnt, int base)
Convert Integer to Text padding left with zeroes to fill cnt chars.
int convTxtToInt32(const char *txt, int cnt, int base, uint32_t *n)
Convert Text to an uint32_t.
int convTxtToInt8(const char *txt, int cnt, int base, uint8_t *n)
Convert Text to an uint8_t.
int convTxtToInt64(const char *txt, int cnt, int base, uint64_t *n)
This function is a synonym to convTxtToInt().
int convBufToBase64(const uint8_t *buf, int nbuf, char *b64, int maxb64)
Encode a sequence of bytes into a Base-64 string.
uint64_t convBufToInt(const uint8_t *buf, int nbuf)
Convert a sequence of bytes in big-endian ordering to an integer.
int convBcdToTxt(const uint8_t *bcd, int maxbcd, char *txt, int maxtxt)
Convert a sequence of digits in BCD format to a decimal string.
int convBase64ToBuf(const char *b64, int cnt, uint8_t *buf, int maxbuf)
Decode a base-64 encoded string into a sequence of bytes.
Larlib basic definitions.
int convHexToBuf(const char *hex, int cnt, uint8_t *buf, int maxbuf)
Convert hexadecimal string to buffer.
int convTxtToInt16(const char *txt, int cnt, int base, uint16_t *n)
Convert Text to an uint16_t.
int convTxtToInt(const char *txt, int cnt, int base, uint64_t *n)
Convert Text to Integer.
int convIntToBcd(uint64_t n, uint8_t *bcd, int maxcnt, int padRight)
Convert Integer to BCD.
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by
