Searched refs:base64Str (Results 1 – 3 of 3) sorted by relevance
/base/security/device_auth/common_lib/impl/src/ |
D | string_util.c | 152 int32_t Base64StringToByte(const char *base64Str, uint8_t *byte, uint32_t *byteLen) in Base64StringToByte() argument 154 if (base64Str == NULL || byte == NULL || byteLen == NULL) { in Base64StringToByte() 157 uint32_t strLen = strlen(base64Str); in Base64StringToByte() 164 if (base64Str[strLen - 1 - i] == '=') { in Base64StringToByte() 174 if (IsInvalidBase64Character(base64Str[0]) || IsInvalidBase64Character(base64Str[1]) || in Base64StringToByte() 175 IsInvalidBase64Character(base64Str[2])) { in Base64StringToByte() 179 if (IsInvalidBase64Character(base64Str[i + 3]) && i + 3 < strLen - j) { in Base64StringToByte() 183 …byte[j] = (g_base64DecodeTable[(int)base64Str[i]] << 2) | (g_base64DecodeTable[(int)base64Str[i + … in Base64StringToByte() 185 byte[j + 1] = (g_base64DecodeTable[(int)base64Str[i + 1]] << 4) | in Base64StringToByte() 186 (g_base64DecodeTable[(int)base64Str[i + 2]] >> 2); in Base64StringToByte() [all …]
|
/base/security/device_security_level/baselib/utils/src/ |
D | utils_base64.c | 229 uint8_t *base64Str = (uint8_t *)malloc(alignLen + 1); in Base64UrlDecodeApp() local 230 if (base64Str == NULL) { in Base64UrlDecodeApp() 234 (void)memset_s(base64Str, alignLen + 1, '=', alignLen + 1); in Base64UrlDecodeApp() 237 base64Str[i] = '+'; in Base64UrlDecodeApp() 239 base64Str[i] = '/'; in Base64UrlDecodeApp() 241 base64Str[i] = src[i]; in Base64UrlDecodeApp() 244 base64Str[alignLen] = '\0'; in Base64UrlDecodeApp() 245 const uint8_t *from = base64Str; in Base64UrlDecodeApp() 247 free(base64Str); in Base64UrlDecodeApp()
|
/base/security/device_auth/common_lib/interfaces/ |
D | string_util.h | 76 int32_t Base64StringToByte(const char *base64Str, uint8_t *byte, uint32_t *byteLen); 86 int32_t ByteToBase64String(const uint8_t *byte, uint32_t byteLen, char *base64Str, uint32_t strLen);
|