We don't need a dependency on data_blob in crypto
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
*/
_PUBLIC_ void arcfour_crypt(uint8_t *data, const uint8_t keystr[16], int len)
{
- DATA_BLOB key = data_blob(keystr, 16);
-
- arcfour_crypt_blob(data, len, &key);
+ uint8_t keycopy[16];
+ DATA_BLOB key = { .data = keycopy, .length = sizeof(keycopy) };
- data_blob_free(&key);
+ memcpy(keycopy, keystr, sizeof(keycopy));
+
+ arcfour_crypt_blob(data, len, &key);
}