aboutsummaryrefslogtreecommitdiffstats
path: root/src/stream/wid_wake
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-30 18:27:18 +0000
committerlloyd <[email protected]>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/stream/wid_wake
parent3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff)
Thomas Moschny passed along a request from the Fedora packagers which came
up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
Diffstat (limited to 'src/stream/wid_wake')
-rw-r--r--src/stream/wid_wake/wid_wake.cpp40
-rw-r--r--src/stream/wid_wake/wid_wake.h16
2 files changed, 30 insertions, 26 deletions
diff --git a/src/stream/wid_wake/wid_wake.cpp b/src/stream/wid_wake/wid_wake.cpp
index c14652c54..1dc0fd7f9 100644
--- a/src/stream/wid_wake/wid_wake.cpp
+++ b/src/stream/wid_wake/wid_wake.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* WiderWake Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* WiderWake
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/wid_wake.h>
#include <botan/loadstor.h>
@@ -9,9 +11,9 @@
namespace Botan {
-/*************************************************
-* Combine cipher stream with message *
-*************************************************/
+/*
+* Combine cipher stream with message
+*/
void WiderWake_41_BE::cipher(const byte in[], byte out[], u32bit length)
{
while(length >= buffer.size() - position)
@@ -26,9 +28,9 @@ void WiderWake_41_BE::cipher(const byte in[], byte out[], u32bit length)
position += length;
}
-/*************************************************
-* Generate cipher stream *
-*************************************************/
+/*
+* Generate cipher stream
+*/
void WiderWake_41_BE::generate(u32bit length)
{
u32bit R0 = state[0], R1 = state[1],
@@ -67,9 +69,9 @@ void WiderWake_41_BE::generate(u32bit length)
position = 0;
}
-/*************************************************
-* WiderWake Key Schedule *
-*************************************************/
+/*
+* WiderWake Key Schedule
+*/
void WiderWake_41_BE::key_schedule(const byte key[], u32bit)
{
for(u32bit j = 0; j != 4; ++j)
@@ -112,9 +114,9 @@ void WiderWake_41_BE::key_schedule(const byte key[], u32bit)
resync(iv, 8);
}
-/*************************************************
-* Resynchronization *
-*************************************************/
+/*
+* Resynchronization
+*/
void WiderWake_41_BE::resync(const byte iv[], u32bit length)
{
if(length != 8)
@@ -130,9 +132,9 @@ void WiderWake_41_BE::resync(const byte iv[], u32bit length)
generate(buffer.size());
}
-/*************************************************
-* Clear memory of sensitive data *
-*************************************************/
+/*
+* Clear memory of sensitive data
+*/
void WiderWake_41_BE::clear() throw()
{
position = 0;
diff --git a/src/stream/wid_wake/wid_wake.h b/src/stream/wid_wake/wid_wake.h
index d73eee2d5..4720afdb2 100644
--- a/src/stream/wid_wake/wid_wake.h
+++ b/src/stream/wid_wake/wid_wake.h
@@ -1,7 +1,9 @@
-/*************************************************
-* WiderWake Header File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
+/*
+* WiderWake
+* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_WIDER_WAKE_H__
#define BOTAN_WIDER_WAKE_H__
@@ -10,9 +12,9 @@
namespace Botan {
-/*************************************************
-* WiderWake4+1-BE *
-*************************************************/
+/*
+* WiderWake4+1-BE
+*/
class BOTAN_DLL WiderWake_41_BE : public StreamCipher
{
public: