along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "includes.h"
-#include "lib/crypto/crypto.h"
+#include "replace.h"
+#include "../lib/crypto/arcfour.h"
/* initialise the arcfour sbox with key */
_PUBLIC_ void arcfour_init(struct arcfour_state *state, const DATA_BLOB *key)
*/
_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);
}