aboutsummaryrefslogtreecommitdiff
path: root/pypride.py
diff options
context:
space:
mode:
Diffstat (limited to 'pypride.py')
-rw-r--r--pypride.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/pypride.py b/pypride.py
index ab90344..b7a38be 100644
--- a/pypride.py
+++ b/pypride.py
@@ -3,7 +3,24 @@
# Date: 22/04/2015
#
# =============================================================================
-# Copyright (c) 2015 Camil Staps (info@camilstaps.nl)
+#
+# Python implementation of the PRIDE cipher
+# Copyright (C) 2015 Camil Staps (info@camilstaps.nl)
+#
+# 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 2 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, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
# =============================================================================
class Pride:
@@ -293,10 +310,6 @@ def number2string_N(i, N):
s = '%0*x' % (N*2, i)
return s.decode('hex')
-def _test():
- import doctest
- doctest.testmod()
-
if __name__ == "__main__":
cipher = Pride("0000000000000000fedcba9876543210".decode('hex'))
encryption = cipher.encrypt("0123456789abcdef".decode('hex'))