summaryrefslogtreecommitdiff
path: root/libtomcrypt/src/modes/ofb/ofb_encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtomcrypt/src/modes/ofb/ofb_encrypt.c')
-rw-r--r--libtomcrypt/src/modes/ofb/ofb_encrypt.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libtomcrypt/src/modes/ofb/ofb_encrypt.c b/libtomcrypt/src/modes/ofb/ofb_encrypt.c
index 8c97a4d..415842d 100644
--- a/libtomcrypt/src/modes/ofb/ofb_encrypt.c
+++ b/libtomcrypt/src/modes/ofb/ofb_encrypt.c
@@ -5,8 +5,6 @@
*
* The library is free for all purposes without any express
* guarantee it works.
- *
- * Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/
#include "tomcrypt.h"
@@ -34,13 +32,13 @@ int ofb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, s
if ((err = cipher_is_valid(ofb->cipher)) != CRYPT_OK) {
return err;
}
-
+
/* is blocklen/padlen valid? */
if (ofb->blocklen < 0 || ofb->blocklen > (int)sizeof(ofb->IV) ||
ofb->padlen < 0 || ofb->padlen > (int)sizeof(ofb->IV)) {
return CRYPT_INVALID_ARG;
}
-
+
while (len-- > 0) {
if (ofb->padlen == ofb->blocklen) {
if ((err = cipher_descriptor[ofb->cipher].ecb_encrypt(ofb->IV, ofb->IV, &ofb->key)) != CRYPT_OK) {
@@ -55,6 +53,6 @@ int ofb_encrypt(const unsigned char *pt, unsigned char *ct, unsigned long len, s
#endif
-/* $Source$ */
-/* $Revision$ */
-/* $Date$ */
+/* ref: $Format:%D$ */
+/* git commit: $Format:%H$ */
+/* commit time: $Format:%ai$ */