cryptutils

Cryptographic Software Utilities
git clone http://git.omkov.net/cryptutils
Log | Tree | Refs | README | LICENCE | Download

AuthorJamozed <[email protected]>
Date2022-03-06 04:15:30
Commit45f70e3ad2e638ab82723343cf4acc8939df3d22
Parent03b01d21c0e46f69f8c6da4e608e3b7a9551a49c

meta: Relicense to MIT

Diffstat

M .gitignore | 1 +
M CMakeLists.txt | 30 +++++++++++++++---------------
M LICENCE | 24 ++++++++++--------------
M README.md | 3 +--
M man/alder32.1 | 5 ++---
M man/crc32.1 | 5 ++---
M man/otp.1 | 5 ++---
M src/alder32.c | 34 ++--------------------------------
M src/crc32.c | 34 ++--------------------------------
M src/fnv1a64.c | 34 ++--------------------------------
M src/otp.c | 34 ++--------------------------------
M src/rc2.c | 32 ++------------------------------

12 files changed, 43 insertions, 198 deletions

diff --git a/.gitignore b/.gitignore
index 5497595..f563e5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 /.cache/
+/.vscode/
 /bin/
 /build/
 /compile_commands.json
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42e693f..d77f4a4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,22 +1,22 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
-PROJECT(cryptutils LANGUAGES C)
+cmake_minimum_required(VERSION 3.12)
+project(cryptutils LANGUAGES C)
 
-SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
-SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
-SET(CMAKE_STATIC_LIBRARY_PREFIX "")
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
+set(CMAKE_STATIC_LIBRARY_PREFIX "")
 
-FIND_PACKAGE(OpenSSL REQUIRED)
+find_package(OpenSSL REQUIRED)
 
-FILE(GLOB SRC_UTIL ${PROJECT_SOURCE_DIR}/src/util/*)
+file(GLOB SRC_UTIL ${PROJECT_SOURCE_DIR}/src/util/*)
 
-ADD_LIBRARY(libutil STATIC ${SRC_UTIL})
+add_library(libutil STATIC ${SRC_UTIL})
 
-LINK_LIBRARIES(libutil)
+link_libraries(libutil)
 
-ADD_EXECUTABLE(alder32 ${PROJECT_SOURCE_DIR}/src/alder32.c)
-ADD_EXECUTABLE(crc32   ${PROJECT_SOURCE_DIR}/src/crc32.c)
-ADD_EXECUTABLE(fnv1a64 ${PROJECT_SOURCE_DIR}/src/fnv1a64.c)
-ADD_EXECUTABLE(otp     ${PROJECT_SOURCE_DIR}/src/otp.c)
-ADD_EXECUTABLE(rc2     ${PROJECT_SOURCE_DIR}/src/rc2.c)
+add_executable(alder32 ${PROJECT_SOURCE_DIR}/src/alder32.c)
+add_executable(crc32   ${PROJECT_SOURCE_DIR}/src/crc32.c)
+add_executable(fnv1a64 ${PROJECT_SOURCE_DIR}/src/fnv1a64.c)
+add_executable(otp     ${PROJECT_SOURCE_DIR}/src/otp.c)
+add_executable(rc2     ${PROJECT_SOURCE_DIR}/src/rc2.c)
 
-TARGET_LINK_LIBRARIES(otp OpenSSL::Crypto)
+target_link_libraries(otp OpenSSL::Crypto)
diff --git a/LICENCE b/LICENCE
index 5e4b579..c6e3a71 100644
--- a/LICENCE
+++ b/LICENCE
@@ -1,24 +1,20 @@
-OMKOV Permissive Licence, version 1.0
+MIT Licence
+
+Copyright (C) 2020, Jakob Wakeling
 
 Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
+this software and associated documentation files (the "Software"), to deal in
 the Software without restriction, including without limitation the rights to
 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 the Software, and to permit persons to whom the Software is furnished to do so,
 subject to the following conditions:
 
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimers.
-* Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimers in the documentation and/or
-  other materials provided with the distribution.
-* Neither the names of the copyright holders, nor the names of its contributors
-  may be used to endorse or promote products derived from this Software without
-  specific prior written permission.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
-HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
+FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
index ac38430..b78a484 100644
--- a/README.md
+++ b/README.md
@@ -37,5 +37,4 @@ option.
 ## Meta
 
 Copyright (C) 2020, Jakob Wakeling
-All rights reserved.  
-[OMKOV Permissive Licence](https://www.omkov.net/OLPE)
+[MIT Licence](https://opensource.org/licenses/MIT)
diff --git a/man/alder32.1 b/man/alder32.1
index 3410277..156fdcf 100644
--- a/man/alder32.1
+++ b/man/alder32.1
@@ -1,4 +1,4 @@
-.TH ALDER32 1 2021-02-16 "OMKOV cryptutils" "General Commands Manual"
+.TH ALDER32 1 2022-03-06 "OMKOV cryptutils" "General Commands Manual"
 .SH NAME
 alder32 \(em compute the Alder-32 for a file
 .SH SYNOPSYS
@@ -27,6 +27,5 @@ An error occurred.
 .SH COPYRIGHT
 .nf
 Copyright (C) 2020, Jakob Wakeling
-All rights reserved.
-OMKOV Permissive Licence (https://www.omkov.net/OLPE)
+MIT Licence (https://opensource.org/licenses/MIT)
 .fi
diff --git a/man/crc32.1 b/man/crc32.1
index f29fa61..fbb76d8 100644
--- a/man/crc32.1
+++ b/man/crc32.1
@@ -1,4 +1,4 @@
-.TH CRC32 1 2021-02-16 "OMKOV cryptutils" "General Commands Manual"
+.TH CRC32 1 2022-03-06 "OMKOV cryptutils" "General Commands Manual"
 .SH NAME
 crc32 \(em compute the CRC-32 for a file
 .SH SYNOPSYS
@@ -27,6 +27,5 @@ An error occurred.
 .SH COPYRIGHT
 .nf
 Copyright (C) 2020, Jakob Wakeling
-All rights reserved.
-OMKOV Permissive Licence (https://www.omkov.net/OLPE)
+MIT Licence (https://opensource.org/licenses/MIT)
 .fi
diff --git a/man/otp.1 b/man/otp.1
index 7f1ad3a..833db11 100644
--- a/man/otp.1
+++ b/man/otp.1
@@ -1,4 +1,4 @@
-.TH OTP 1 2021-01-23 "OMKOV cryptutils" "General Commands Manual"
+.TH OTP 1 2022-03-06 "OMKOV cryptutils" "General Commands Manual"
 .SH NAME
 otp \(em compute hotp or totp tokens
 .SH SYNOPSYS
@@ -26,6 +26,5 @@ An error occurred.
 .SH COPYRIGHT
 .nf
 Copyright (C) 2020, Jakob Wakeling
-All rights reserved.
-OMKOV Permissive Licence (https://www.omkov.net/OLPE)
+MIT Licence (https://opensource.org/licenses/MIT)
 .fi
diff --git a/src/alder32.c b/src/alder32.c
index ac1bb6f..99f7f39 100644
--- a/src/alder32.c
+++ b/src/alder32.c
@@ -1,34 +1,7 @@
 // alder32.c, version 1.1.0
 // OMKOV cryptutils alder32
 // Copyright (C) 2020, Jakob Wakeling
-// All rights reserved.
-
-/*
-OMKOV Permissive Licence, version 1.0
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimers.
-* Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimers in the documentation and/or
-  other materials provided with the distribution.
-* Neither the names of the copyright holders, nor the names of its contributors
-  may be used to endorse or promote products derived from this Software without
-  specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
-HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-*/
+// MIT Licence
 
 #include "util/error.c"
 #include "util/optget.h"
@@ -99,13 +72,10 @@ static void hlp(void) {
 	puts("  --bsd      Use BSD style checksums");
 	puts("  --help     Display help information");
 	puts("  --version  Display version information");
-	return;
 }
 
 static void ver(void) {
 	puts("OMKOV cryptutils alder32, version " VERSION);
 	puts("Copyright (C) 2020, Jakob Wakeling");
-	puts("All rights reserved.");
-	puts("OMKOV Permissive Licence (https://www.omkov.net/OLPE)");
-	return;
+	puts("MIT Licence (https://opensource.org/licenses/MIT)");
 }
diff --git a/src/crc32.c b/src/crc32.c
index 93c5fa8..331ba85 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -1,34 +1,7 @@
 // crc32.c, version 1.1.1
 // OMKOV cryptutils crc32
 // Copyright (C) 2020, Jakob Wakeling
-// All rights reserved.
-
-/*
-OMKOV Permissive Licence, version 1.0
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimers.
-* Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimers in the documentation and/or
-  other materials provided with the distribution.
-* Neither the names of the copyright holders, nor the names of its contributors
-  may be used to endorse or promote products derived from this Software without
-  specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
-HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-*/
+// MIT Licence
 
 #include "util/error.c"
 #include "util/optget.h"
@@ -102,16 +75,13 @@ static void hlp(void) {
 	puts("  --bsd      Use BSD style CRCs");
 	puts("  --help     Display help information");
 	puts("  --version  Display version information");
-	return;
 }
 
 /* Print version information */
 static void ver(void) {
 	puts("OMKOV cryptutils crc32, version " VERSION);
 	puts("Copyright (C) 2020, Jakob Wakeling");
-	puts("All rights reserved.");
-	puts("OMKOV Permissive Licence (https://www.omkov.net/OLPE)");
-	return;
+	puts("MIT Licence (https://opensource.org/licenses/MIT)");
 }
 
 static const uint32_t CRC32[] = {
diff --git a/src/fnv1a64.c b/src/fnv1a64.c
index 565ba71..40ea873 100644
--- a/src/fnv1a64.c
+++ b/src/fnv1a64.c
@@ -1,34 +1,7 @@
 // fnv1a64.c, version 1.0.0
 // OMKOV cryptutils fnv1a64
 // Copyright (C) 2021, Jakob Wakeling
-// All rights reserved.
-
-/*
-OMKOV Permissive Licence, version 1.0
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimers.
-* Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimers in the documentation and/or
-  other materials provided with the distribution.
-* Neither the names of the copyright holders, nor the names of its contributors
-  may be used to endorse or promote products derived from this Software without
-  specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
-HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-*/
+// MIT Licence
 
 #include "util/error.c"
 #include "util/optget.h"
@@ -102,14 +75,11 @@ static void hlp(void) {
 	puts("  --bsd      Use BSD style hashes");
 	puts("  --help     Display help information");
 	puts("  --version  Display version information");
-	return;
 }
 
 /* Print version information */
 static void ver(void) {
 	puts("OMKOV cryptutils fnv1a64, version " VERSION);
 	puts("Copyright (C) 2021, Jakob Wakeling");
-	puts("All rights reserved.");
-	puts("OMKOV Permissive Licence (https://www.omkov.net/OLPE)");
-	return;
+	puts("MIT Licence (https://opensource.org/licenses/MIT)");
 }
diff --git a/src/otp.c b/src/otp.c
index 62c1e49..c423375 100644
--- a/src/otp.c
+++ b/src/otp.c
@@ -1,34 +1,7 @@
 // otp.c, version 0.2.0
 // OMKOV cryptutils otp
 // Copyright (C) 2020, Jakob Wakeling
-// All rights reserved.
-
-/*
-OMKOV Permissive Licence, version 1.0
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimers.
-* Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimers in the documentation and/or
-  other materials provided with the distribution.
-* Neither the names of the copyright holders, nor the names of its contributors
-  may be used to endorse or promote products derived from this Software without
-  specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
-HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-*/
+// MIT Licence
 
 #include "util/base32.h"
 #include "util/error.c"
@@ -111,14 +84,11 @@ static void hlp(void) {
 	puts("options:");
 	puts("  --help     Display help information");
 	puts("  --version  Display version information");
-	return;
 }
 
 /* Print version information */
 static void ver(void) {
 	puts("OMKOV cryptutils otp, version " VERSION);
 	puts("Copyright (C) 2020, Jakob Wakeling");
-	puts("All rights reserved.");
-	puts("OMKOV Permissive Licence (https://www.omkov.net/OLPE)");
-	return;
+	puts("MIT Licence (https://opensource.org/licenses/MIT)");
 }
diff --git a/src/rc2.c b/src/rc2.c
index aa8b1d1..bf86f9a 100644
--- a/src/rc2.c
+++ b/src/rc2.c
@@ -1,34 +1,7 @@
 // rc2.c, version 0.2.0
 // OMKOV cryptutils rc2
 // Copyright (C) 2021, Jakob Wakeling
-// All rights reserved.
-
-/*
-OMKOV Permissive Licence, version 1.0
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal with
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimers.
-* Redistributions in binary form must reproduce the above copyright notice, this
-  list of conditions and the following disclaimers in the documentation and/or
-  other materials provided with the distribution.
-* Neither the names of the copyright holders, nor the names of its contributors
-  may be used to endorse or promote products derived from this Software without
-  specific prior written permission.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT
-HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
-*/
+// MIT Licence
 
 #include "util/error.c"
 #include "util/optget.h"
@@ -148,6 +121,5 @@ static void hlp(void) {
 static void ver(void) {
 	puts("OMKOV cryptutils rc2, version " VERSION);
 	puts("Copyright (C) 2021, Jakob Wakeling");
-	puts("All rights reserved.");
-	puts("OMKOV Permissive Licence (https://www.omkov.net/OLPE)");
+	puts("MIT Licence (https://opensource.org/licenses/MIT)");
 }