Searched refs:base64Str (Results 1 – 4 of 4) sorted by relevance
/base/security/device_auth/common_lib/impl/src/ |
D | string_util.c | 125 int32_t Base64StringToByte(const char *base64Str, uint8_t *byte, uint32_t *byteLen) in Base64StringToByte() argument 127 if (base64Str == NULL || byte == NULL || byteLen == NULL) { in Base64StringToByte() 130 uint32_t strLen = strlen(base64Str); in Base64StringToByte() 137 if (base64Str[strLen - 1 - i] == '=') { in Base64StringToByte() 147 if (IsInvalidBase64Character(base64Str[0]) || IsInvalidBase64Character(base64Str[1]) || in Base64StringToByte() 148 IsInvalidBase64Character(base64Str[2])) { in Base64StringToByte() 152 if (IsInvalidBase64Character(base64Str[i + 3]) && i + 3 < strLen - j) { in Base64StringToByte() 156 …byte[j] = (g_base64DecodeTable[(int)base64Str[i]] << 2) | (g_base64DecodeTable[(int)base64Str[i + … in Base64StringToByte() 158 byte[j + 1] = (g_base64DecodeTable[(int)base64Str[i + 1]] << 4) | in Base64StringToByte() 159 (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 | 65 int32_t Base64StringToByte(const char *base64Str, uint8_t *byte, uint32_t *byteLen); 75 int32_t ByteToBase64String(const uint8_t *byte, uint32_t byteLen, char *base64Str, uint32_t strLen);
|
/base/security/device_auth/services/session_manager/src/session/v2/expand_sub_session/ |
D | expand_sub_session.c | 143 const char *base64Str = GetStringFromJson(receviedMsg, FIELD_ENC_DATA); in GetRecvEncData() local 144 if (base64Str == NULL) { in GetRecvEncData() 148 uint32_t recvEncDataLen = HcStrlen(base64Str) / 4 * 3; in GetRecvEncData() 154 if (Base64StringToByte(base64Str, recvEncDataVal, &recvEncDataLen) != HC_SUCCESS) { in GetRecvEncData() 340 char *base64Str = (char *)HcMalloc(base64StrLen, 0); in BuildEncData() local 341 if (base64Str == NULL) { in BuildEncData() 346 res = ByteToBase64String(sendEncData.val, sendEncData.length, base64Str, base64StrLen); in BuildEncData() 350 HcFree(base64Str); in BuildEncData() 353 if (AddStringToJson(sendMsg, FIELD_ENC_DATA, base64Str) != HC_SUCCESS) { in BuildEncData() 355 HcFree(base64Str); in BuildEncData() [all …]
|