forked from globalzon/yaamp
-
Notifications
You must be signed in to change notification settings - Fork 681
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
31124f7
commit 94d3ba1
Showing
7 changed files
with
73 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
#include <stdlib.h> | ||
#include <stdint.h> | ||
#include <string.h> | ||
#include <stdio.h> | ||
|
||
#include "sha256.h" | ||
|
||
#include <stdlib.h> | ||
|
||
void sha256q_hash(const char* input, char* output, uint32_t len) | ||
{ | ||
unsigned char hash[64]; | ||
|
||
SHA256_CTX ctx_sha256; | ||
SHA256_Init(&ctx_sha256); | ||
SHA256_Update(&ctx_sha256, input, len); | ||
SHA256_Final(hash, &ctx_sha256); | ||
|
||
SHA256_Init(&ctx_sha256); | ||
SHA256_Update(&ctx_sha256, hash, 32); | ||
SHA256_Final(hash, &ctx_sha256); | ||
|
||
SHA256_Init(&ctx_sha256); | ||
SHA256_Update(&ctx_sha256, hash, 32); | ||
SHA256_Final(hash, &ctx_sha256); | ||
|
||
SHA256_Init(&ctx_sha256); | ||
SHA256_Update(&ctx_sha256, hash, 32); | ||
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef SHA256Q_H | ||
#define SHA256Q_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <stdint.h> | ||
|
||
void sha256q_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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[TCP] | ||
server = yaamp.com | ||
port = 3337 | ||
password = tu8tu5 | ||
|
||
[SQL] | ||
host = yaampdb | ||
database = yaamp | ||
username = root | ||
password = patofpaq | ||
|
||
[STRATUM] | ||
algo = sha256q | ||
difficulty = 1 | ||
max_ttf = 40000 | ||
reconnect = 1 | ||
|
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
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