* cosmetics (dates, ws, ordering, header cosmetics)
* mentioned code contributors in the docu (even the "passive" ones as openbsd etc) --HG-- extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4064
This commit is contained in:
parent
6da5b9b378
commit
ccca6f24dd
23 changed files with 169 additions and 173 deletions
20
LICENSE.txt
20
LICENSE.txt
|
@ -1,19 +1,19 @@
|
|||
Copyright (c) 2005 Mathias Gumz <akira at fluxbox dot org>
|
||||
Copyright (c) 2005 - 2007 Mathias Gumz <akira at fluxbox dot org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of 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
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
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 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
|
||||
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 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.
|
||||
|
|
25
README.txt
25
README.txt
|
@ -1,7 +1,7 @@
|
|||
ALOCK(1)
|
||||
========
|
||||
Mathias Gumz <akira@fluxbox.org>
|
||||
v1.0, 2 March 2007
|
||||
v1.0, 17 March 2007
|
||||
|
||||
NAME
|
||||
----
|
||||
|
@ -94,6 +94,29 @@ OPTIONS
|
|||
AUTHOR
|
||||
------
|
||||
Written by Mathias Gumz <akira at fluxbox dot org>
|
||||
Based upon xtrlock
|
||||
|
||||
MD5
|
||||
~~~
|
||||
Code taken from OpenBSD, which took it from public domain.
|
||||
Original author was Colin Plumb.
|
||||
|
||||
SHA1
|
||||
~~~~
|
||||
Code based upon public domain code, originally written by
|
||||
Steve Reid <steve@edmweb.com>
|
||||
|
||||
SHA2
|
||||
~~~~
|
||||
Code based upon OpenBSD code, originally public domain and
|
||||
written by Aaron D. Gifford <me@aarongifford.com>.
|
||||
|
||||
Whirlpool
|
||||
~~~~~~~~~
|
||||
Based upon public domain, originally written by
|
||||
|
||||
Paulo S. L. M. Barreto <pbarreto@scopus.com.br>
|
||||
Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
|
||||
|
||||
RESOURCES
|
||||
---------
|
||||
|
|
27
alock.txt
27
alock.txt
|
@ -1,7 +1,7 @@
|
|||
ALOCK(1)
|
||||
========
|
||||
Mathias Gumz <akira@fluxbox.org>
|
||||
v1.0, 22 September 2006
|
||||
v1.0, 17 March 2007
|
||||
|
||||
NAME
|
||||
----
|
||||
|
@ -94,6 +94,29 @@ OPTIONS
|
|||
AUTHOR
|
||||
------
|
||||
Written by Mathias Gumz <akira at fluxbox dot org>
|
||||
Based upon xtrlock
|
||||
|
||||
MD5
|
||||
~~~
|
||||
Code taken from OpenBSD, which took it from public domain.
|
||||
Original author was Colin Plumb.
|
||||
|
||||
SHA1
|
||||
~~~~
|
||||
Code based upon public domain code, originally written by
|
||||
Steve Reid <steve@edmweb.com>
|
||||
|
||||
SHA2
|
||||
~~~~
|
||||
Code based upon OpenBSD code, originally public domain and
|
||||
written by Aaron D. Gifford <me@aarongifford.com>.
|
||||
|
||||
Whirlpool
|
||||
~~~~~~~~~
|
||||
Based upon public domain, originally written by
|
||||
|
||||
Paulo S. L. M. Barreto <pbarreto@scopus.com.br>
|
||||
Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
|
||||
|
||||
RESOURCES
|
||||
---------
|
||||
|
@ -117,6 +140,6 @@ Other Lockers ::
|
|||
|
||||
COPYING
|
||||
-------
|
||||
Copyright (C) 2005 - 2006 Mathias Gumz. Free use of this software is
|
||||
Copyright (C) 2005 - 2007 Mathias Gumz. Free use of this software is
|
||||
granted under the terms of the MIT. See LICENSE provided in the
|
||||
distribution.
|
||||
|
|
|
@ -23,7 +23,7 @@ endef
|
|||
##########################
|
||||
MAKEDEP ?= gcc -MM
|
||||
CC ?= gcc
|
||||
CFLAGS += -Wall -DVERSION=$(VERSION)
|
||||
CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations -DVERSION=$(VERSION)
|
||||
LDFLAGS ?=
|
||||
LIBS ?= -lX11
|
||||
##########################
|
||||
|
|
12
src/alock.c
12
src/alock.c
|
@ -2,31 +2,25 @@
|
|||
|
||||
file : alock.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 30 April 2005 14:19:44 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include "alock.h"
|
||||
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/*----------------------------------------------*\
|
||||
\*----------------------------------------------*/
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
/*------------------------------------------------------------------*\
|
||||
globals
|
||||
|
|
15
src/alock.h
15
src/alock.h
|
@ -4,16 +4,14 @@
|
|||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
file : aklock.h
|
||||
file : alock.h
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 30 Apr 2005 11:51:52 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -21,13 +19,16 @@
|
|||
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
#ifdef DEBUG
|
||||
# define DBGMSG fprintf(stderr, "%s : %d\n", __FUNCTION__, __LINE__); fflush(stderr)
|
||||
#else
|
||||
# define DBGMSG
|
||||
#endif // DEBUG
|
||||
#endif /* DEBUG */
|
||||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
|
||||
|
@ -73,7 +74,7 @@ struct aOpts {
|
|||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
void alock_string2lower(char* string);
|
||||
int alock_native_byte_order();
|
||||
int alock_native_byte_order(void);
|
||||
int alock_alloc_color(const struct aXInfo* xinfo, const int scr,
|
||||
const char* color_name,
|
||||
const char* fallback_name,
|
||||
|
@ -89,5 +90,5 @@ int alock_shade_pixmap(const struct aXInfo* xinfo,
|
|||
unsigned int width,
|
||||
unsigned int height);
|
||||
|
||||
#endif // _ALOCK_H_
|
||||
#endif /* _ALOCK_H_ */
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : alock_utils.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Mo 23 Mai 2005 13:55:24 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -20,14 +18,14 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#ifdef HAVE_XRENDER
|
||||
# include <X11/extensions/Xrender.h>
|
||||
#endif /* HAVE_XRENDER */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "alock.h"
|
||||
|
||||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
file : auth_md5.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : based on: openbsd md5.c/h
|
||||
|
||||
|
@ -18,8 +18,6 @@
|
|||
|
||||
start : Sa 07 Mai 2005 13:21:45 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -32,14 +30,14 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef STAND_ALONE
|
||||
# include <X11/Xlib.h>
|
||||
# include "alock.h"
|
||||
#endif /* STAND_ALONE */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
|
||||
|
@ -409,7 +407,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
if (argc > 1) {
|
||||
printf("amd5 - reads from stdin to calculate a md5-hash.\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
md5_init(&md5);
|
||||
|
@ -423,7 +421,7 @@ int main(int argc, char* argv[]) {
|
|||
printf("\n");
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* STAND_ALONE */
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
|
||||
file : auth_none.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 07 Mai 2005 16:41:28 CEST
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
about :
|
||||
|
||||
about :
|
||||
|
||||
provide -auth none, any "password" is accepted
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
@ -21,7 +20,6 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : auth_pam.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 07 Mai 2005 16:21:24 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -26,10 +24,10 @@
|
|||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include "alock.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -37,12 +35,10 @@
|
|||
#include <pwd.h>
|
||||
|
||||
#include <security/pam_appl.h>
|
||||
#ifdef LINUX
|
||||
#ifdef __linux
|
||||
# include <security/pam_misc.h>
|
||||
#endif /* LINUX */
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
file : auth_passwd.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 07 Mai 2005 16:40:01 CEST
|
||||
|
||||
$Id$
|
||||
start : Sa 07 Mai 2005 16:40:01 CEST
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
@ -23,8 +21,9 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <stdio.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
@ -40,7 +39,6 @@
|
|||
#endif /* HAVE_SHADOW */
|
||||
#endif /* __linux */
|
||||
|
||||
#include "alock.h"
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
|
@ -80,7 +78,7 @@ static int alock_auth_passwd_init(const char* args) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int alock_auth_passwd_deinit() {
|
||||
static int alock_auth_passwd_deinit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
file : auth_sha1.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : based on: openbsd sha1.c/h
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
|||
|
||||
start : So 08 Mai 2005 13:21:45 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -26,17 +24,17 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
#ifndef STAND_ALONE
|
||||
# include "alock.h"
|
||||
#endif /* STAND_ALONE */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifndef STAND_ALONE
|
||||
# include <X11/Xlib.h>
|
||||
# include "alock.h"
|
||||
#endif /* STAND_ALONE */
|
||||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
|
||||
|
@ -347,7 +345,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
if (argc > 1) {
|
||||
printf("asha1 - reads from stdin to calculate a sha1-hash.\n");
|
||||
exit(0);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
sha1_init(&sha1);
|
||||
|
@ -361,7 +359,7 @@ int main(int argc, char* argv[]) {
|
|||
printf("\n");
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#endif /* STAND_ALONE */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
file : auth_sha2.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : based on: openbsd sha2.c/h
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
|||
|
||||
start : So 08 Mai 2005 13:21:45 CEST
|
||||
|
||||
$Id: auth_sha1.c 31 2005-05-25 06:43:42Z mathias $
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -28,17 +26,18 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifndef STAND_ALONE
|
||||
# include <X11/Xlib.h>
|
||||
# include "alock.h"
|
||||
#endif /* STAND_ALONE */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
/*------------------------------------------------------------------*\
|
||||
\*------------------------------------------------------------------*/
|
||||
|
||||
|
@ -156,7 +155,7 @@ static void sha512_transform(sha512Context *, const u_int8_t *);
|
|||
/*------------------------------------------------------------------*\
|
||||
SHA-XYZ INITIAL HASH VALUES AND CONSTANTS
|
||||
\*------------------------------------------------------------------*/
|
||||
const static u_int32_t K256[64] = {
|
||||
static const u_int32_t K256[64] = {
|
||||
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
|
||||
0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
|
||||
0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
|
||||
|
@ -176,7 +175,7 @@ const static u_int32_t K256[64] = {
|
|||
};
|
||||
|
||||
/* Initial hash value H for SHA-256: */
|
||||
const static u_int32_t sha256_initial_hash_value[8] = {
|
||||
static const u_int32_t sha256_initial_hash_value[8] = {
|
||||
0x6a09e667UL,
|
||||
0xbb67ae85UL,
|
||||
0x3c6ef372UL,
|
||||
|
@ -188,7 +187,7 @@ const static u_int32_t sha256_initial_hash_value[8] = {
|
|||
};
|
||||
|
||||
/* Hash constant words K for SHA-384 and SHA-512: */
|
||||
const static u_int64_t K512[80] = {
|
||||
static const u_int64_t K512[80] = {
|
||||
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
|
||||
0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
|
||||
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
|
||||
|
@ -232,7 +231,7 @@ const static u_int64_t K512[80] = {
|
|||
};
|
||||
|
||||
/* Initial hash value H for SHA-384 */
|
||||
const static u_int64_t sha384_initial_hash_value[8] = {
|
||||
static const u_int64_t sha384_initial_hash_value[8] = {
|
||||
0xcbbb9d5dc1059ed8ULL,
|
||||
0x629a292a367cd507ULL,
|
||||
0x9159015a3070dd17ULL,
|
||||
|
@ -244,7 +243,7 @@ const static u_int64_t sha384_initial_hash_value[8] = {
|
|||
};
|
||||
|
||||
/* Initial hash value H for SHA-512 */
|
||||
const static u_int64_t sha512_initial_hash_value[8] = {
|
||||
static const u_int64_t sha512_initial_hash_value[8] = {
|
||||
0x6a09e667f3bcc908ULL,
|
||||
0xbb67ae8584caa73bULL,
|
||||
0x3c6ef372fe94f82bULL,
|
||||
|
@ -395,11 +394,11 @@ void sha256_transform(sha256Context *context, const u_int8_t *data) {
|
|||
/* Part of the message block expansion: */
|
||||
s0 = W256[(j+1)&0x0f];
|
||||
s0 = sigma0_256(s0);
|
||||
s1 = W256[(j+14)&0x0f];
|
||||
s1 = W256[(j+14)&0x0f];
|
||||
s1 = sigma1_256(s1);
|
||||
|
||||
/* Apply the SHA-256 compression function to update a..h */
|
||||
T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
|
||||
T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] +
|
||||
(W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0);
|
||||
T2 = Sigma0_256(a) + Maj(a, b, c);
|
||||
h = g;
|
||||
|
@ -1091,7 +1090,7 @@ void usage() {
|
|||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
|
||||
unsigned char digest[SHA512_DIGEST_LENGTH];
|
||||
size_t i;
|
||||
unsigned char c;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
file : auth_wpool.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2006 by m. gumz
|
||||
copyr : copyright (c) 2006 - 2007 by m. gumz
|
||||
|
||||
license : based on: whirlpool.c nessie.h 64bit_tables2.h
|
||||
|
||||
|
@ -29,8 +29,6 @@
|
|||
|
||||
start : Do 21 September 2006 20:27:48 CEST
|
||||
|
||||
$Id: $
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -43,15 +41,16 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifndef STAND_ALONE
|
||||
# include <X11/Xlib.h>
|
||||
# include "alock.h"
|
||||
#endif /* STAND_ALONE */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
|
@ -104,15 +103,6 @@ enum {
|
|||
#define T16(x) ((x) & ONE16)
|
||||
#define T32(x) ((x) & ONE32)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef unsigned __int64 u64;
|
||||
typedef signed __int64 s64;
|
||||
|
||||
enum {
|
||||
ONE64 = 0xffffffffffffffffi64
|
||||
};
|
||||
|
||||
#else /* !_MSC_VER */
|
||||
typedef unsigned long long u64;
|
||||
typedef signed long long s64;
|
||||
|
||||
|
@ -120,7 +110,6 @@ enum {
|
|||
ONE64 = 0xffffffffffffffffULL
|
||||
};
|
||||
|
||||
#endif /* ?_MSC_VER */
|
||||
#define T64(x) ((x) & ONE64)
|
||||
#define ROTR64(v, n) (((v) >> (n)) | T64((v) << (64 - (n))))
|
||||
/*
|
||||
|
@ -1116,7 +1105,7 @@ static void wpool_add(const unsigned char* const source,
|
|||
*
|
||||
* This method uses the invariant: bufferBits < 512
|
||||
*/
|
||||
static void wpool_finalize(wpoolContext * const ctx,
|
||||
static void wpool_finalize(wpoolContext * const ctx,
|
||||
unsigned char* const result) {
|
||||
|
||||
int i;
|
||||
|
@ -1297,7 +1286,7 @@ struct aAuth alock_auth_wpool = {
|
|||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
#else
|
||||
#else
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : bg_blank.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Di 17 Mai 2005 10:44:20 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -22,11 +20,11 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : bg_image.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Mi 18 Mai 2005 00:51:10 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -22,13 +20,12 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
#include <Imlib2.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <Imlib2.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
file : bg_none.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 14 Mai 2005 14:27:48 CEST
|
||||
|
||||
$Id$
|
||||
start : Sa 14 Mai 2005 14:27:48 CEST
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
@ -20,9 +18,10 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : bg_shade.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Di 18 Mai 2005 10:44:20 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -22,12 +20,12 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : cursor_glyph.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Di 17 Mai 2005 14:19:44 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -22,12 +20,12 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <X11/cursorfont.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : cursor_image.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Mi 01 June 2005 10:48:21 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -25,7 +23,9 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#ifdef HAVE_IMLIB2
|
||||
# include <Imlib2.h>
|
||||
|
@ -34,8 +34,6 @@
|
|||
#endif /* HAVE_IMLIB2 | HAVE_XPM */
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
file : cursor_none.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Di 17 Mai 2005 12:10:35 CEST
|
||||
|
||||
$Id$
|
||||
start : Di 17 Mai 2005 12:10:35 CEST
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
@ -22,7 +20,7 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
@ -43,7 +41,7 @@ static int alock_cursor_none_deinit(struct aXInfo* xinfo) {
|
|||
|
||||
struct aCursor alock_cursor_none = {
|
||||
"none",
|
||||
alock_cursor_none_init,
|
||||
alock_cursor_none_init,
|
||||
alock_cursor_none_deinit
|
||||
};
|
||||
|
||||
|
|
|
@ -2,16 +2,12 @@
|
|||
|
||||
file : cursor_theme.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Sa 30 Apr 2005 12:02:47 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -24,12 +20,12 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
file : cursor_xcursor.c
|
||||
author : m. gumz <akira at fluxbox dot org>
|
||||
copyr : copyright (c) 2005 by m. gumz
|
||||
copyr : copyright (c) 2005 - 2007 by m. gumz
|
||||
|
||||
license : see LICENSE
|
||||
|
||||
start : Di 17 Mai 2005 12:14:36 CEST
|
||||
|
||||
$Id$
|
||||
|
||||
\* ---------------------------------------------------------------- */
|
||||
/* ---------------------------------------------------------------- *\
|
||||
|
||||
|
@ -22,10 +20,11 @@
|
|||
/* ---------------------------------------------------------------- *\
|
||||
includes
|
||||
\* ---------------------------------------------------------------- */
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "alock.h"
|
||||
|
||||
#include <X11/Xcursor/Xcursor.h>
|
||||
#include <string.h>
|
||||
#include "alock.h"
|
||||
|
||||
/* ---------------------------------------------------------------- *\
|
||||
\* ---------------------------------------------------------------- */
|
||||
|
|
Reference in a new issue