Lines Matching defs:iv
365 // If decrypting the first block in a file, read the iv from the manifest
366 // or derive the iv from the file's sequence number.
368 AString iv;
369 if (itemMeta->findString("cipher-iv", &iv)) {
370 if ((!iv.startsWith("0x") && !iv.startsWith("0X"))
371 || iv.size() > 16 * 2 + 2) {
372 ALOGE("malformed cipher IV '%s'.", iv.c_str());
376 while (iv.size() < 16 * 2 + 2) {
377 iv.insert("0", 1, 2);
382 char c1 = tolower(iv.c_str()[2 + 2 * i]);
383 char c2 = tolower(iv.c_str()[3 + 2 * i]);
385 ALOGE("malformed cipher IV '%s'.", iv.c_str());