- 🇬🇧United Kingdom ikit-claw
Closing as 8.1.x is obsolete at this point. Please recreate if needed.
I am trying to return a BLOB value decrypted. Do I need to parse the value from a BLOB to a string value first before I use decryption? It works fine in my app but it just returns blank when I try to decrypt the value with the following (the value is stored as a BLOB in Drupal) e.g.
<030146f4 727616ca 1b15b228 0e50c476 7d955fd1 81f5ed27 fc25b137 68afe0f8 060287a9 e265acbb b62b926d 37710757 53810c67 8580e1b7 c842c742 88612885 97b60ec7 02d59710 04158af7 9cdd8917 8f35>
Here's a snippet of the code - the first name value is blank in the output. Any help would be great. Thanks.
$encryption_service = \Drupal::service('encryption');
$elements = [];
foreach ($items as $delta => $item) {
$elements[$delta] = [
'#type' => 'markup',
'#markup' => $item->subject_id . ', ' . $item->subject_global_id
. ', First name: ' . $encryption_service->decrypt($item->subject_fname) . ', ' . $item->subject_lname
. ', ' . $item->subject_dob . ', ' . $item->subject_education
. ', ' . $item->subject_occupation . ', ' . $item->subject_dominant_hand
. ', ' . $item->subject_gender . ', ' . $item->subject_passcode
. ', ' . $item->subject_photo . ', ' . $item->subject_device_id
];
}
return $elements;
}
Closed: won't fix
1.0
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Closing as 8.1.x is obsolete at this point. Please recreate if needed.