Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-21 Thread sin
On Sun, Jul 21, 2013 at 09:10:31AM -0400, Galos, David wrote: > >> Question, what are we to do with sha512sum? It requires some > >> constants to be long long and we are compiling with C89/C90. > >> > >> Any ideas? > > So far, the solution to this has been to use int64_t in stdint.h > > Although t

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-21 Thread Galos, David
>> Question, what are we to do with sha512sum? It requires some >> constants to be long long and we are compiling with C89/C90. >> >> Any ideas? > So far, the solution to this has been to use int64_t in stdint.h > Although that header is only guaranteed in c99, the header tends > to be available i

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-21 Thread Galos, David
> Question, what are we to do with sha512sum? It requires some > constants to be long long and we are compiling with C89/C90. > > Any ideas? So far, the solution to this has been to use int64_t in stdint.h Although that header is only guaranteed in c99, the header tends to be available in c89 mode

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-20 Thread sin
On Sat, Jul 20, 2013 at 01:25:09PM -0400, Galos, David wrote: > > /* public domain sha256 implementation based on fips180-3 */ > > > > you may add that it's from the crypt code of musl libc > > in case somebody wants to check upstream changes > > I have applied the patch, then moved that line to t

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-20 Thread Galos, David
> /* public domain sha256 implementation based on fips180-3 */ > > you may add that it's from the crypt code of musl libc > in case somebody wants to check upstream changes I have applied the patch, then moved that line to the top of the file, and removed the notice about the nonexistent crypt cod

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-20 Thread Szabolcs Nagy
* Galos, David [2013-07-20 00:50:25 -0400]: > >> +/* > >> + * public domain sha256 crypt implementation > >> + * > >> + * original sha crypt design: > >> http://people.redhat.com/drepper/SHA-crypt.txt > >> + * in this implementation at least 32bit int is assumed, > >> + * key length is limited, t

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-19 Thread Galos, David
>> +/* >> + * public domain sha256 crypt implementation >> + * >> + * original sha crypt design: http://people.redhat.com/drepper/SHA-crypt.txt >> + * in this implementation at least 32bit int is assumed, >> + * key length is limited, the $5$ prefix is mandatory, '\n' and ':' is >> rejected >> + *

Re: [dev] [sbase] [patch] Add sha256sum(1)

2013-07-19 Thread Szabolcs Nagy
* sin [2013-07-19 16:34:07 +0300]: > +/* > + * public domain sha256 crypt implementation > + * > + * original sha crypt design: http://people.redhat.com/drepper/SHA-crypt.txt > + * in this implementation at least 32bit int is assumed, > + * key length is limited, the $5$ prefix is mandatory, '\n'

[dev] [sbase] [patch] Add sha256sum(1)

2013-07-19 Thread sin
Hi, Added sha256sum(1). No support for -c. Thanks, sin >From 2f8b277fbef7f7d40051cf2ceb751ea6b1b9b7bd Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 19 Jul 2013 14:29:43 +0100 Subject: [PATCH 1/2] Add sha256sum(1) --- Makefile | 4 +- sha256.h | 18 +++ sha256sum.1 | 8 +++