summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/crypt-gensalt.c
Commit message (Collapse)AuthorAgeFilesLines
* * construct "struct {} list [] = {}" confuses pgindent - split those.Neil Conway2005-03-211-9/+0
| | | | | | | | | | It was a bad style to begin with, and now several loops can be clearer. * pgcrypto.c: Fix function comments * crypt-gensalt.c, crypt-blowfish.c: stop messing with errno * openssl.c: use px_free instead pfree * px.h: make redefining px_alloc/px_realloc/px_free easier Marko Kreen
* * When postgres.h does not define BYTE_ENDIAN pgcryptoBruce Momjian2001-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | produces garbage. I learned the hard way that #if UNDEFINED_1 == UNDEFINED_2 #error "gcc is idiot" #endif prints "gcc is idiot" ... Affected are MD5/SHA1 in internal library, and also HMAC-MD5/HMAC-SHA1/ crypt-md5 which use them. Blowfish is ok, also Rijndael on at least x86. Big thanks to Daniel Holtzman who send me a build log which contained warning: md5.c:246: warning: `X' defined but not used Yes, gcc is that helpful... Please apply this. -- marko
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-251-42/+61
| | | | tests pass.
* Fix some portability problems (get it to compile, at least, on HP's cc)Tom Lane2001-10-151-14/+8
|
* Big thanks to Solar Designer who pointed out a bug in bcryptBruce Momjian2001-09-231-0/+181
salt generation code. He also urged using better random source and making possible to choose using bcrypt and xdes rounds more easily. So, here's patch: * For all salt generation, use Solar Designer's own code. This is mostly due fact that his code is more fit for get_random_bytes() style interface. * New function: gen_salt(type, rounds). This lets specify iteration count for algorithm. * random.c: px_get_random_bytes() function. Supported randomness soure: /dev/urandom, OpenSSL PRNG, libc random() Default: /dev/urandom. * Draft description of C API for pgcrypto functions. New files: API, crypt-gensalt.c, random.c Marko Kreen