forked from tpruvot/yiimp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trim them, btw... its important to start on a clean base...
- Loading branch information
Showing
291 changed files
with
64,248 additions
and
64,249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#include "blake.h" | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_blake.h" | ||
|
||
|
||
void blake_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
sph_blake256_context ctx_blake; | ||
sph_blake256_init(&ctx_blake); | ||
sph_blake256(&ctx_blake, input, len); | ||
sph_blake256_close(&ctx_blake, output); | ||
} | ||
#include "blake.h" | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_blake.h" | ||
|
||
|
||
void blake_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
sph_blake256_context ctx_blake; | ||
sph_blake256_init(&ctx_blake); | ||
sph_blake256(&ctx_blake, input, len); | ||
sph_blake256_close(&ctx_blake, output); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#ifndef BLAKE_H | ||
#define BLAKE_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void blake_hash(const char* input, char* output, uint32_t len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
#ifndef BLAKE_H | ||
#define BLAKE_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void blake_hash(const char* input, char* output, uint32_t len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,44 @@ | ||
#include "fresh.h" | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_shavite.h" | ||
#include "../sha3/sph_simd.h" | ||
#include "../sha3/sph_echo.h" | ||
|
||
void fresh_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
sph_shavite512_context ctx_shavite1; | ||
sph_simd512_context ctx_simd1; | ||
sph_echo512_context ctx_echo1; | ||
|
||
//these uint512 in the c++ source of the client are backed by an array of uint32 | ||
uint32_t hashA[16], hashB[16]; | ||
|
||
sph_shavite512_init (&ctx_shavite1); | ||
sph_shavite512 (&ctx_shavite1, input, len); | ||
sph_shavite512_close(&ctx_shavite1, hashA); | ||
|
||
sph_simd512_init (&ctx_simd1); | ||
sph_simd512 (&ctx_simd1, hashA, 64); | ||
sph_simd512_close(&ctx_simd1, hashB); | ||
|
||
sph_shavite512_init (&ctx_shavite1); | ||
sph_shavite512 (&ctx_shavite1, hashB, 64); | ||
sph_shavite512_close(&ctx_shavite1, hashA); | ||
|
||
sph_simd512_init (&ctx_simd1); | ||
sph_simd512 (&ctx_simd1, hashA, 64); | ||
sph_simd512_close(&ctx_simd1, hashB); | ||
|
||
sph_echo512_init (&ctx_echo1); | ||
sph_echo512 (&ctx_echo1, hashB, 64); | ||
sph_echo512_close(&ctx_echo1, hashA); | ||
|
||
memcpy(output, hashA, 32); | ||
|
||
} | ||
|
||
#include "fresh.h" | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_shavite.h" | ||
#include "../sha3/sph_simd.h" | ||
#include "../sha3/sph_echo.h" | ||
|
||
void fresh_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
sph_shavite512_context ctx_shavite1; | ||
sph_simd512_context ctx_simd1; | ||
sph_echo512_context ctx_echo1; | ||
|
||
//these uint512 in the c++ source of the client are backed by an array of uint32 | ||
uint32_t hashA[16], hashB[16]; | ||
|
||
sph_shavite512_init (&ctx_shavite1); | ||
sph_shavite512 (&ctx_shavite1, input, len); | ||
sph_shavite512_close(&ctx_shavite1, hashA); | ||
|
||
sph_simd512_init (&ctx_simd1); | ||
sph_simd512 (&ctx_simd1, hashA, 64); | ||
sph_simd512_close(&ctx_simd1, hashB); | ||
|
||
sph_shavite512_init (&ctx_shavite1); | ||
sph_shavite512 (&ctx_shavite1, hashB, 64); | ||
sph_shavite512_close(&ctx_shavite1, hashA); | ||
|
||
sph_simd512_init (&ctx_simd1); | ||
sph_simd512 (&ctx_simd1, hashA, 64); | ||
sph_simd512_close(&ctx_simd1, hashB); | ||
|
||
sph_echo512_init (&ctx_echo1); | ||
sph_echo512 (&ctx_echo1, hashB, 64); | ||
sph_echo512_close(&ctx_echo1, hashA); | ||
|
||
memcpy(output, hashA, 32); | ||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
#ifndef FRESH_H | ||
#define FRESH_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void fresh_hash(const char* input, char* output, uint32_t len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
#ifndef FRESH_H | ||
#define FRESH_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void fresh_hash(const char* input, char* output, uint32_t len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
|
||
#include "groestl.h" | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_groestl.h" | ||
#include "sha256.h" | ||
|
||
void groestl_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
char hash1[64]; | ||
char hash2[64]; | ||
|
||
sph_groestl512_context ctx_groestl; | ||
sph_groestl512_init(&ctx_groestl); | ||
sph_groestl512(&ctx_groestl, input, len); | ||
sph_groestl512_close(&ctx_groestl, &hash1); | ||
|
||
sph_groestl512(&ctx_groestl, hash1, 64); | ||
sph_groestl512_close(&ctx_groestl, &hash2); | ||
|
||
memcpy(output, &hash2, 32); | ||
} | ||
|
||
void groestlmyriad_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
char temp[64]; | ||
|
||
sph_groestl512_context ctx_groestl; | ||
sph_groestl512_init(&ctx_groestl); | ||
sph_groestl512(&ctx_groestl, input, len); | ||
sph_groestl512_close(&ctx_groestl, &temp); | ||
|
||
SHA256_CTX ctx_sha256; | ||
SHA256_Init(&ctx_sha256); | ||
SHA256_Update(&ctx_sha256, &temp, 64); | ||
SHA256_Final((unsigned char*) output, &ctx_sha256); | ||
} | ||
|
||
#include "groestl.h" | ||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_groestl.h" | ||
#include "sha256.h" | ||
|
||
void groestl_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
char hash1[64]; | ||
char hash2[64]; | ||
|
||
sph_groestl512_context ctx_groestl; | ||
sph_groestl512_init(&ctx_groestl); | ||
sph_groestl512(&ctx_groestl, input, len); | ||
sph_groestl512_close(&ctx_groestl, &hash1); | ||
|
||
sph_groestl512(&ctx_groestl, hash1, 64); | ||
sph_groestl512_close(&ctx_groestl, &hash2); | ||
|
||
memcpy(output, &hash2, 32); | ||
} | ||
|
||
void groestlmyriad_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
char temp[64]; | ||
|
||
sph_groestl512_context ctx_groestl; | ||
sph_groestl512_init(&ctx_groestl); | ||
sph_groestl512(&ctx_groestl, input, len); | ||
sph_groestl512_close(&ctx_groestl, &temp); | ||
|
||
SHA256_CTX ctx_sha256; | ||
SHA256_Init(&ctx_sha256); | ||
SHA256_Update(&ctx_sha256, &temp, 64); | ||
SHA256_Final((unsigned char*) output, &ctx_sha256); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#ifndef GROESTL_H | ||
#define GROESTL_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void groestl_hash(const char* input, char* output, uint32_t len); | ||
void groestlmyriad_hash(const char* input, char* output, uint32_t len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
#ifndef GROESTL_H | ||
#define GROESTL_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void groestl_hash(const char* input, char* output, uint32_t len); | ||
void groestlmyriad_hash(const char* input, char* output, uint32_t len); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
|
||
#include <stdint.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_types.h" | ||
#include "../sha3/sph_keccak.h" | ||
|
||
void keccak_hash(const char *input, char *output, uint32_t len) | ||
{ | ||
sph_keccak256_context ctx_keccak; | ||
sph_keccak256_init(&ctx_keccak); | ||
|
||
sph_keccak256(&ctx_keccak, input, len); | ||
sph_keccak256_close(&ctx_keccak, output); | ||
} | ||
|
||
//void keccak_hash2(const char *input, char *output, uint32_t len) | ||
//{ | ||
// uint32_t hashA[16]; | ||
// | ||
// sph_keccak512_context ctx_keccak; | ||
// sph_keccak512_init(&ctx_keccak); | ||
// | ||
// sph_keccak512(&ctx_keccak, input, len); | ||
// sph_keccak512_close(&ctx_keccak, hashA); | ||
// | ||
// memcpy(output, hashA, 32); | ||
//} | ||
|
||
|
||
#include <stdint.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "../sha3/sph_types.h" | ||
#include "../sha3/sph_keccak.h" | ||
|
||
void keccak_hash(const char *input, char *output, uint32_t len) | ||
{ | ||
sph_keccak256_context ctx_keccak; | ||
sph_keccak256_init(&ctx_keccak); | ||
|
||
sph_keccak256(&ctx_keccak, input, len); | ||
sph_keccak256_close(&ctx_keccak, output); | ||
} | ||
|
||
//void keccak_hash2(const char *input, char *output, uint32_t len) | ||
//{ | ||
// uint32_t hashA[16]; | ||
// | ||
// sph_keccak512_context ctx_keccak; | ||
// sph_keccak512_init(&ctx_keccak); | ||
// | ||
// sph_keccak512(&ctx_keccak, input, len); | ||
// sph_keccak512_close(&ctx_keccak, hashA); | ||
// | ||
// memcpy(output, hashA, 32); | ||
//} | ||
|
||
|
Oops, something went wrong.