aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/tea
diff options
context:
space:
mode:
authorlloyd <lloyd@randombit.net>2009-03-30 18:27:18 +0000
committerlloyd <lloyd@randombit.net>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/block/tea
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/block/tea')
-rw-r--r--src/block/tea/tea.cpp28
-rw-r--r--src/block/tea/tea.h16
2 files changed, 24 insertions, 20 deletions
diff --git a/src/block/tea/tea.cpp b/src/block/tea/tea.cpp
index 7b79d86d1..2b4212d9c 100644
--- a/src/block/tea/tea.cpp
+++ b/src/block/tea/tea.cpp
@@ -1,16 +1,18 @@
-/*************************************************
-* TEA Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* TEA
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/tea.h>
#include <botan/loadstor.h>
namespace Botan {
-/*************************************************
-* TEA Encryption *
-*************************************************/
+/*
+* TEA Encryption
+*/
void TEA::enc(const byte in[], byte out[]) const
{
u32bit L = load_be<u32bit>(in, 0), R = load_be<u32bit>(in, 1);
@@ -26,9 +28,9 @@ void TEA::enc(const byte in[], byte out[]) const
store_be(out, L, R);
}
-/*************************************************
-* TEA Decryption *
-*************************************************/
+/*
+* TEA Decryption
+*/
void TEA::dec(const byte in[], byte out[]) const
{
u32bit L = load_be<u32bit>(in, 0), R = load_be<u32bit>(in, 1);
@@ -44,9 +46,9 @@ void TEA::dec(const byte in[], byte out[]) const
store_be(out, L, R);
}
-/*************************************************
-* TEA Key Schedule *
-*************************************************/
+/*
+* TEA Key Schedule
+*/
void TEA::key_schedule(const byte key[], u32bit)
{
for(u32bit j = 0; j != 4; ++j)
diff --git a/src/block/tea/tea.h b/src/block/tea/tea.h
index b751eda4e..8ddf3e330 100644
--- a/src/block/tea/tea.h
+++ b/src/block/tea/tea.h
@@ -1,7 +1,9 @@
-/*************************************************
-* TEA Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* TEA
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_TEA_H__
#define BOTAN_TEA_H__
@@ -10,9 +12,9 @@
namespace Botan {
-/*************************************************
-* TEA *
-*************************************************/
+/*
+* TEA
+*/
class BOTAN_DLL TEA : public BlockCipher
{
public: