Accept const data for b58check

This commit is contained in:
Luke Dashjr 2014-08-17 11:43:44 +00:00
parent 195033316e
commit 696869093e
2 changed files with 3 additions and 3 deletions

View File

@ -97,10 +97,10 @@ bool my_dblsha256(void *hash, const void *data, size_t datasz)
return b58_sha256_impl(buf, data, datasz) && b58_sha256_impl(hash, buf, sizeof(buf));
}
int b58check(void *bin, size_t binsz, const char *base58str, size_t b58sz)
int b58check(const void *bin, size_t binsz, const char *base58str, size_t b58sz)
{
unsigned char buf[32];
unsigned char *binc = bin;
const uint8_t *binc = bin;
unsigned i;
if (!my_dblsha256(buf, bin, binsz - 4))
return -2;

View File

@ -7,6 +7,6 @@
extern bool (*b58_sha256_impl)(void *, const void *, size_t);
extern bool b58tobin(void *bin, size_t binsz, const char *b58, size_t b58sz);
extern int b58check(void *bin, size_t binsz, const char *b58, size_t b58sz);
extern int b58check(const void *bin, size_t binsz, const char *b58, size_t b58sz);
#endif