Lines Matching refs:length

51         size_t length = 0;

53 napi_get_typedarray_info(env, src, &type, &length, &resultData, nullptr, nullptr);
54 if (type != napi_uint8_array || length == 0) {
56 "Parameter error. The type of Parameter must be Uint8Array and the length greater than zero.");
60 unsigned char *rets = EncodeAchieve(inputEncode_, length, valueType);
84 size_t length = 0;
86 napi_get_typedarray_info(env, src, &type, &length, &resultData, nullptr, nullptr);
87 if (type != napi_uint8_array || length == 0) {
89 "Parameter error. The type of Parameter must be Uint8Array and the length greater than zero.");
93 unsigned char *ret = EncodeAchieve(inputEncode_, length, valueType);
202 size_t length = 0;
206 napi_get_typedarray_info(env, src, &type, &length, &resultData, nullptr, nullptr);
230 } else if (type == napi_typedarray_type::napi_uint8_array && length > 0) {
232 pret = DecodeAchieve(env, inputDecode_, length, valueType);
235 "Parameter error. The type of Parameter must be Uint8Array or string and the length greater than 0.";
367 size_t length = 0;
369 napi_get_typedarray_info(env, src, &type, &length, &resultData, nullptr, nullptr);
370 if (type != napi_uint8_array || length == 0) {
372 "Parameter error. The type of Parameter must be Uint8Array and the length greater than zero.");
377 CreateEncodePromise(env, inputEncode, length, valueType);
384 size_t length = 0;
386 napi_get_typedarray_info(env, src, &type, &length, &resultData, nullptr, nullptr);
387 if (type != napi_uint8_array || length == 0) {
389 "Parameter error. The type of Parameter must be Uint8Array and the length greater than zero.");
394 CreateEncodeToStringPromise(env, inputEncode, length, valueType);
398 void Base64::CreateEncodePromise(napi_env env, unsigned char *inputDecode, size_t length, Type valueType)
407 stdEncodeInfo_->slength = length;
417 void Base64::CreateEncodeToStringPromise(napi_env env, unsigned char *inputDecode, size_t length, Type valueType)
422 stdEncodeInfo_->slength = length;
568 size_t length = 0;
573 if (napi_get_typedarray_info(env, src, &type, &length, &resultData, nullptr, nullptr) != napi_ok) {
595 } else if (type == napi_typedarray_type::napi_uint8_array && length > 0) {
597 CreateDecodePromise(env, inputDecode, length, valueType);
600 "Parameter error. The type of Parameter must be Uint8Array or string and the length greater than 0.";
608 void Base64::CreateDecodePromise(napi_env env, char *inputDecode, size_t length, Type valueType)
613 stdDecodeInfo_->slength = length;