Lines Matching refs:params
80 KmParamSet(KmParamSet&& other) : keymaster_key_param_set_t{other.params, other.length} { in KmParamSet()
82 other.params = nullptr;
85 ~KmParamSet() { delete[] params; } in ~KmParamSet()
122 if (set.length == 0 || set.params == nullptr) in kmParamSet2Hidl()
126 keymaster_key_param_t* params = set.params; in kmParamSet2Hidl() local
128 auto tag = params[i].tag; in kmParamSet2Hidl()
133 result[i].f.integer = params[i].enumerated; in kmParamSet2Hidl()
137 result[i].f.integer = params[i].integer; in kmParamSet2Hidl()
141 result[i].f.longInteger = params[i].long_integer; in kmParamSet2Hidl()
144 result[i].f.dateTime = params[i].date_time; in kmParamSet2Hidl()
147 result[i].f.boolValue = params[i].boolean; in kmParamSet2Hidl()
151 result[i].blob.setToExternal(const_cast<unsigned char*>(params[i].blob.data), in kmParamSet2Hidl()
152 params[i].blob.data_length); in kmParamSet2Hidl()
156 params[i].tag = KM_TAG_INVALID; in kmParamSet2Hidl()
165 ::keymaster::AuthorizationSet* params) { in addClientAndAppData() argument
166 params->Clear(); in addClientAndAppData()
168 params->push_back(::keymaster::TAG_APPLICATION_ID, clientId.data(), clientId.size()); in addClientAndAppData()
171 params->push_back(::keymaster::TAG_APPLICATION_DATA, appData.data(), appData.size()); in addClientAndAppData()
180 set.params = new keymaster_key_param_t[keyParams.size()]; in hidlKeyParams2Km()
188 set.params[i] = keymaster_param_enum(tag, keyParams[i].f.integer); in hidlKeyParams2Km()
192 set.params[i] = keymaster_param_int(tag, keyParams[i].f.integer); in hidlKeyParams2Km()
196 set.params[i] = keymaster_param_long(tag, keyParams[i].f.longInteger); in hidlKeyParams2Km()
199 set.params[i] = keymaster_param_date(tag, keyParams[i].f.dateTime); in hidlKeyParams2Km()
203 set.params[i] = keymaster_param_bool(tag); in hidlKeyParams2Km()
205 set.params[i].tag = KM_TAG_INVALID; in hidlKeyParams2Km()
209 set.params[i] = in hidlKeyParams2Km()
214 set.params[i].tag = KM_TAG_INVALID; in hidlKeyParams2Km()
246 ::android::hardware::keymaster::V4_0::HmacSharingParameters params; in getHmacSharingParameters()
247 params.seed.setToExternal(const_cast<uint8_t*>(response.params.seed.data), in getHmacSharingParameters()
248 response.params.seed.data_length); in getHmacSharingParameters()
249 static_assert(sizeof(response.params.nonce) == params.nonce.size(), "Nonce sizes don't match"); in getHmacSharingParameters()
250 memcpy(params.nonce.data(), response.params.nonce, params.nonce.size()); in getHmacSharingParameters()
251 _hidl_cb(legacy_enum_conversion(response.error), params); in getHmacSharingParameters()
256 const hidl_vec<::android::hardware::keymaster::V4_0::HmacSharingParameters>& params, in computeSharedHmac() argument
259 request.params_array.params_array = new keymaster::HmacSharingParameters[params.size()]; in computeSharedHmac()
260 request.params_array.num_params = params.size(); in computeSharedHmac()
261 for (size_t i = 0; i < params.size(); ++i) { in computeSharedHmac()
262 request.params_array.params_array[i].seed = {params[i].seed.data(), params[i].seed.size()}; in computeSharedHmac()
264 decltype(params[i].nonce)::size(), in computeSharedHmac()
266 memcpy(request.params_array.params_array[i].nonce, params[i].nonce.data(), in computeSharedHmac()
267 params[i].nonce.size()); in computeSharedHmac()
359 Return<void> AndroidKeymaster4Device::importKey(const hidl_vec<KeyParameter>& params, in importKey() argument
364 request.key_description.Reinitialize(KmParamSet(params)); in importKey()