mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-15 12:04:18 +01:00
29 lines
739 B
C
29 lines
739 B
C
#include "internal.h"
|
|
#include "hmac.h"
|
|
#include "ccan/ccan/endian/endian.h"
|
|
#include "ccan/ccan/crypto/sha256/sha256.h"
|
|
#include "ccan/ccan/crypto/sha512/sha512.h"
|
|
#include "ccan/ccan/build_assert/build_assert.h"
|
|
#include <ccan/compiler/compiler.h>
|
|
#include <include/wally_crypto.h>
|
|
|
|
#define SHA_T sha256
|
|
#define SHA_ALIGN_T uint32_t
|
|
#define SHA_MEM u32
|
|
#define SHA_POST(name) name ## sha256
|
|
#define PBKDF2_HMAC_SHA_LEN PBKDF2_HMAC_SHA256_LEN
|
|
#include "pbkdf2.inl"
|
|
|
|
#undef SHA_T
|
|
#define SHA_T sha512
|
|
#undef SHA_ALIGN_T
|
|
#define SHA_ALIGN_T uint64_t
|
|
#undef SHA_MEM
|
|
#define SHA_MEM u64
|
|
#undef SHA_POST
|
|
#define SHA_POST(name) name ## sha512
|
|
#undef PBKDF2_HMAC_SHA_LEN
|
|
#define PBKDF2_HMAC_SHA_LEN PBKDF2_HMAC_SHA512_LEN
|
|
#include "pbkdf2.inl"
|
|
|