]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - arcfour/arcfour.h
fixing E-Mail-Address & Copyright
[avr-crypto-lib.git] / arcfour / arcfour.h
index d332d7f8ed1f384f6368b4bfe2f1ae6caded66ad..6a69219961529a245b20418cc30ad6b9cf060b88 100644 (file)
@@ -1,21 +1,21 @@
 /* arcfour.h */
 /*
   This file is part of the AVR-Crypto-Lib.
   Copyright (C) 2008  Daniel Otte (daniel.otte@rub.de)
+ This file is part of the AVR-Crypto-Lib.
Copyright (C) 2006-2015 Daniel Otte (bg@nerilex.org)
 
   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 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.
+ 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/>.
-*/
+ You should have received a copy of the GNU General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
 /*
  * File:       arcfour.h
  * Author:     Daniel Otte
@@ -38,7 +38,6 @@
  * http://www.mozilla.org/projects/security/pki/nss/draft-kaukonen-cipher-arcfour-03.txt
  */
 
-
 #ifndef ARCFOUR_H_
 #define ARCFOUR_H_
 
  * The struct holds the two indices and the S-Box
  */
 typedef struct arcfour_ctx_st {
-       uint8_t i,j;
-       uint8_t s[256];
+    uint8_t i, j;
+    uint8_t s[256];
 } arcfour_ctx_t;
 
-
 /** \fn void arcfour_init(const void *key, uint8_t length_B, arcfour_ctx_t *ctx)
  * \brief setup a context with a key
  *
@@ -71,10 +69,10 @@ typedef struct arcfour_ctx_st {
  * the supplied key of the given length.
  * \param ctx pointer to the context
  * \param key pointer to the key
- * \param length_B length of the key in bytes (between 1 and 255)
+ * \param length_b length of the key in bits (between 8 and 2048)
  */
 
-void arcfour_init(const void *key, uint8_t length_B, arcfour_ctx_t *ctx);
+void arcfour_init(const void *key, uint16_t length_b, arcfour_ctx_t *ctx);
 
 /** \fn uint8_t arcfour_gen(arcfour_ctx_t *ctx)
  * \brief generates a byte of keystream