fix headers & footers in demos & tests

This commit is contained in:
Steffen Jaeckel 2017-06-19 15:49:18 +02:00
parent 4cd1355b8f
commit 6fc0a90a1e
36 changed files with 286 additions and 12 deletions

View File

@ -5,8 +5,6 @@
* *
* The library is free for all purposes without any express * The library is free for all purposes without any express
* guarantee it works. * guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/ */
#include "tomcrypt.h" #include "tomcrypt.h"

View File

@ -1,3 +1,12 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* /*
* Written by Daniel Richards <kyhwana@world-net.co.nz> 6/7/2002 * Written by Daniel Richards <kyhwana@world-net.co.nz> 6/7/2002
* hash.c: This app uses libtomcrypt to hash either stdin or a file * hash.c: This app uses libtomcrypt to hash either stdin or a file

View File

@ -1,3 +1,12 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* encrypt V1.1 Fri Oct 18 04:28:03 NZDT 2002 */ /* encrypt V1.1 Fri Oct 18 04:28:03 NZDT 2002 */
/* File de/encryption, using libtomcrypt */ /* File de/encryption, using libtomcrypt */
/* Written by Daniel Richards <kyhwana@world-net.co.nz> */ /* Written by Daniel Richards <kyhwana@world-net.co.nz> */

View File

@ -1,3 +1,12 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* /*
* Demo to do the rough equivalent of: * Demo to do the rough equivalent of:
* *
@ -382,3 +391,7 @@ int main(int argc, char *argv[]) {
fclose(infd); fclose(outfd); fclose(infd); fclose(outfd);
return 0; return 0;
} }
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -5,8 +5,6 @@
* *
* The library is free for all purposes without any express * The library is free for all purposes without any express
* guarantee it works. * guarantee it works.
*
* Tom St Denis, tomstdenis@gmail.com, http://libtom.org
*/ */
#include "tomcrypt.h" #include "tomcrypt.h"
@ -42,7 +40,6 @@ int main(void) {
return 0; return 0;
} }
/* ref: $Format:%D$ */
/* $Source: $ */ /* git commit: $Format:%H$ */
/* $Revision: $ */ /* commit time: $Format:%ai$ */
/* $Date: $ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* small demo app that just includes a cipher/hash/prng */ /* small demo app that just includes a cipher/hash/prng */
#include <tomcrypt.h> #include <tomcrypt.h>

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt.h> #include <tomcrypt.h>
#if defined(_WIN32) #if defined(_WIN32)

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt.h> #include <tomcrypt.h>
void hash_gen(void) void hash_gen(void)

View File

@ -136,6 +136,8 @@ MARKER
MARKER MARKER
my @all_files; my @all_files;
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'src'); find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'src');
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'demos');
find({ wanted=> sub { push @all_files, $_ if $_ =~ /\.(c|h)$/ }, no_chdir=>1 }, 'tests');
for my $f (@all_files) { for my $f (@all_files) {
my $txt = read_file($f); my $txt = read_file($f);
if ($txt !~ /^\Q$first_comment\E/s) { if ($txt !~ /^\Q$first_comment\E/s) {

View File

@ -16,7 +16,7 @@
#define NAME(s) #s #define NAME(s) #s
const char *crypt_build_settings = const char *crypt_build_settings =
"LibTomCrypt " SCRYPT " (Tom St Denis, tomstdenis@gmail.com)\n" "LibTomCrypt " SCRYPT " (www.libtom.net)\n"
"LibTomCrypt is public domain software.\n" "LibTomCrypt is public domain software.\n"
#if defined(INCLUDE_BUILD_DATE) #if defined(INCLUDE_BUILD_DATE)
"Built on " __DATE__ " at " __TIME__ "\n" "Built on " __DATE__ " at " __TIME__ "\n"

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#if defined(LTC_BASE64) || defined(LTC_BASE64_URL) #if defined(LTC_BASE64) || defined(LTC_BASE64_URL)

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* test the ciphers and hashes using their built-in self-tests */ /* test the ciphers and hashes using their built-in self-tests */
#include <tomcrypt_test.h> #include <tomcrypt_test.h>

View File

@ -62,3 +62,7 @@ void print_hex(const char* what, const void* v, const unsigned long l)
} }
prng_state yarrow_prng; prng_state yarrow_prng;
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#ifndef DEMOS_COMMON_H_ #ifndef DEMOS_COMMON_H_
#define DEMOS_COMMON_H_ #define DEMOS_COMMON_H_
@ -18,3 +26,7 @@ void run_cmd(int res, int line, char *file, char *cmd, const char *algorithm);
void print_hex(const char* what, const void* v, const unsigned long l); void print_hex(const char* what, const void* v, const unsigned long l);
#endif /* DEMOS_COMMON_H_ */ #endif /* DEMOS_COMMON_H_ */
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#if defined(GMP_LTC_DESC) || defined(USE_GMP) #if defined(GMP_LTC_DESC) || defined(USE_GMP)
#include <gmp.h> #include <gmp.h>

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_MDH #ifdef LTC_MDH
@ -118,3 +126,7 @@ int dh_test(void)
} }
#endif #endif
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_MDSA #ifdef LTC_MDSA

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_MECC #ifdef LTC_MECC

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* test file related functions */ /* test file related functions */
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
@ -101,3 +109,7 @@ int file_test(void)
return CRYPT_OK; return CRYPT_OK;
#endif #endif
} }
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_MKAT #ifdef LTC_MKAT
@ -228,3 +236,7 @@ int katja_test(void)
} }
#endif #endif
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* test pmac/omac/hmac */ /* test pmac/omac/hmac */
#include <tomcrypt_test.h> #include <tomcrypt_test.h>

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
int misc_test(void) int misc_test(void)

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* test CFB/OFB/CBC modes */ /* test CFB/OFB/CBC modes */
#include <tomcrypt_test.h> #include <tomcrypt_test.h>

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
/* test the multi helpers... */ /* test the multi helpers... */
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
@ -223,3 +231,7 @@ int multi_test(void)
return CRYPT_OK; return CRYPT_OK;
} }
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,12 +1,10 @@
/* LibTomCrypt, modular cryptographic library /* LibTomCrypt, modular cryptographic library -- Tom St Denis
* *
* LibTomCrypt is a library that provides various cryptographic * LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner. * algorithms in a highly modular and flexible manner.
* *
* The library is free for all purposes without any express * The library is free for all purposes without any express
* guarantee it works. * guarantee it works.
*
* http://libtom.org
*/ */
#include "tomcrypt.h" #include "tomcrypt.h"

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_PKCS_1 #ifdef LTC_PKCS_1

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_PKCS_1 #ifdef LTC_PKCS_1

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_PKCS_1 #ifdef LTC_PKCS_1

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_PKCS_1 #ifdef LTC_PKCS_1

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_PKCS_1 #ifdef LTC_PKCS_1

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_PRNG_ENABLE_LTC_RNG #ifdef LTC_PRNG_ENABLE_LTC_RNG
@ -76,3 +84,7 @@ int prng_test(void)
} }
return err; return err;
} }
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
/* Test rotate macros */ /* Test rotate macros */
@ -402,3 +410,7 @@ int rotate_test(void)
return err; return err;
} }
/* ref: $Format:%D$ */
/* git commit: $Format:%H$ */
/* commit time: $Format:%ai$ */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifdef LTC_MRSA #ifdef LTC_MRSA

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
/* Test store/load macros with offsets */ /* Test store/load macros with offsets */

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include <tomcrypt_test.h> #include <tomcrypt_test.h>
#ifndef GIT_VERSION #ifndef GIT_VERSION

View File

@ -1,3 +1,11 @@
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#ifndef __TEST_H_ #ifndef __TEST_H_
#define __TEST_H_ #define __TEST_H_