Licensing fix in util/sha256.c
This commit is contained in:
parent
4da54928e7
commit
50d9305752
@ -1,12 +1,4 @@
|
|||||||
/*
|
/* public domain sha256 implementation based on fips180-3 */
|
||||||
* 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
|
|
||||||
* in the salt and rounds= setting must contain a valid iteration count,
|
|
||||||
* on error "*" is returned.
|
|
||||||
*/
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -14,8 +6,6 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "../sha256.h"
|
#include "../sha256.h"
|
||||||
|
|
||||||
/* public domain sha256 implementation based on fips180-3 */
|
|
||||||
|
|
||||||
static uint32_t ror(uint32_t n, int k) { return (n >> k) | (n << (32-k)); }
|
static uint32_t ror(uint32_t n, int k) { return (n >> k) | (n << (32-k)); }
|
||||||
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
|
#define Ch(x,y,z) (z ^ (x & (y ^ z)))
|
||||||
#define Maj(x,y,z) ((x & y) | (z & (x | y)))
|
#define Maj(x,y,z) ((x & y) | (z & (x | y)))
|
||||||
|
Loading…
Reference in New Issue
Block a user