#include <config.h>
#include "Arcfour.h"
-/** @brief Encrypt using Arcfour stream cipher
- * @param context Context structure
- * @param inbuf Input buffer
- * @param outbuf Output buffer
- * @param length Number of bytes in @p inbuf
- *
- * Copies from @p inbuf to @p outbuf, encrypting (or decrypting) using
- * the stream controlled by @p context.
- */
void Arcfour::stream(char *outbuf, size_t length) {
uint8_t i = idx_i;
uint8_t j = idx_j;
#define ARCFOUR_SBOX_SIZE 256
-/** @brief Context structture for Arcfour stream cipher */
class Arcfour {
char sbox[ARCFOUR_SBOX_SIZE];
uint8_t idx_i, idx_j;
Author
======
-Richard Kettlewell <rjk@greenend.org.uk>
+Copyright (C) 2011 Richard Kettlewell
+Copyright (C) 2000, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+\"
+\" This file is part of vbig.
+\" Copyright (C) 2011 Richard Kettlewell
+\"
+\" This program is free software: you can redistribute it and/or modify
+\" it under the terms of the GNU General Public License as published by
+\" the Free Software Foundation, either version 3 of the License, or
+\" (at your option) any later version.
+\"
+\" This program is distributed in the hope that it will be useful,
+\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+\" GNU General Public License for more details.
+\"
+\" You should have received a copy of the GNU General Public License
+\" along with this program. If not, see <http://www.gnu.org/licenses/>.
+\"
.TH vbig 1
.SH NAME
vbig \- create or verify a large but pseudo-random file
+/*
+ * This file is part of vbig.
+ * Copyright (C) 2011 Richard Kettlewell
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include <config.h>
#include <cstdio>
#include <cstring>