rename sha1coin to sha1
parent
65fd5d4f73
commit
7b6c01de26
|
@ -17,7 +17,7 @@
|
|||
"qubit.c",
|
||||
"hefty1.c",
|
||||
"shavite3.c",
|
||||
"sha1coin.c",
|
||||
"sha1.c",
|
||||
"sha3/sph_hefty1.c",
|
||||
"sha3/sph_fugue.c",
|
||||
"sha3/aes_helper.c",
|
||||
|
|
|
@ -17,7 +17,7 @@ extern "C" {
|
|||
#include "qubit.h"
|
||||
#include "hefty1.h"
|
||||
#include "shavite3.h"
|
||||
#include "sha1coin.h"
|
||||
#include "sha1.h"
|
||||
}
|
||||
|
||||
using namespace node;
|
||||
|
@ -389,7 +389,7 @@ Handle<Value> shavite3(const Arguments& args) {
|
|||
return scope.Close(buff->handle_);
|
||||
}
|
||||
|
||||
Handle<Value> sha1coin(const Arguments& args) {
|
||||
Handle<Value> sha1(const Arguments& args) {
|
||||
HandleScope scope;
|
||||
|
||||
if (args.Length() < 1)
|
||||
|
@ -405,7 +405,7 @@ Handle<Value> sha1coin(const Arguments& args) {
|
|||
|
||||
uint32_t input_len = Buffer::Length(target);
|
||||
|
||||
sha1coin_hash(input, output, input_len);
|
||||
sha1_hash(input, output, input_len);
|
||||
|
||||
Buffer* buff = Buffer::New(output, 32);
|
||||
return scope.Close(buff->handle_);
|
||||
|
@ -427,7 +427,7 @@ void init(Handle<Object> exports) {
|
|||
exports->Set(String::NewSymbol("qubit"), FunctionTemplate::New(qubit)->GetFunction());
|
||||
exports->Set(String::NewSymbol("hefty1"), FunctionTemplate::New(hefty1)->GetFunction());
|
||||
exports->Set(String::NewSymbol("shavite3"), FunctionTemplate::New(shavite3)->GetFunction());
|
||||
exports->Set(String::NewSymbol("sha1coin"), FunctionTemplate::New(sha1coin)->GetFunction());
|
||||
exports->Set(String::NewSymbol("sha1"), FunctionTemplate::New(sha1)->GetFunction());
|
||||
}
|
||||
|
||||
NODE_MODULE(multihashing, init)
|
||||
|
|
|
@ -26,6 +26,6 @@
|
|||
"blake",
|
||||
"shavite",
|
||||
"fugue",
|
||||
"sha1coin"
|
||||
"sha1"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "sha1coin.h"
|
||||
#include "sha1.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <openssl/sha.h>
|
||||
|
@ -31,7 +31,7 @@ inline void encodeb64(const unsigned char* pch, char* buff)
|
|||
*(buff + 1) = 0;
|
||||
}
|
||||
|
||||
void sha1coin_hash(const char* input, char* output, uint32_t len)
|
||||
void sha1_hash(const char* input, char* output, uint32_t len)
|
||||
{
|
||||
char str[38] __attribute__((aligned(32))); // 26 + 11 + 1
|
||||
uint32_t prehash[5] __attribute__((aligned(32)));
|
|
@ -7,7 +7,7 @@ extern "C" {
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
void sha1coin_hash(const char* input, char* output, uint32_t len);
|
||||
void sha1_hash(const char* input, char* output, uint32_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
Loading…
Reference in New Issue