FILE_READ_BUFSIZE > LTC_FILE_READ_BUFSIZE
This commit is contained in:
parent
06b1582de6
commit
883db95da2
@ -552,7 +552,9 @@
|
|||||||
|
|
||||||
#ifndef LTC_NO_FILE
|
#ifndef LTC_NO_FILE
|
||||||
/* buffer size for reading from a file via fread(..) */
|
/* buffer size for reading from a file via fread(..) */
|
||||||
#define FILE_READ_BUFSIZE 8192
|
#ifndef LTC_FILE_READ_BUFSIZE
|
||||||
|
#define LTC_FILE_READ_BUFSIZE 8192
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* $Source$ */
|
/* $Source$ */
|
||||||
|
@ -42,7 +42,7 @@ int poly1305_file(const char *fname, const unsigned char *key, unsigned long key
|
|||||||
LTC_ARGCHK(maclen != NULL);
|
LTC_ARGCHK(maclen != NULL);
|
||||||
|
|
||||||
if ((in = fopen(fname, "rb")) == NULL) { return CRYPT_FILE_NOTFOUND; }
|
if ((in = fopen(fname, "rb")) == NULL) { return CRYPT_FILE_NOTFOUND; }
|
||||||
if ((buf = XMALLOC(FILE_READ_BUFSIZE)) == NULL) { return CRYPT_MEM; }
|
if ((buf = XMALLOC(LTC_FILE_READ_BUFSIZE)) == NULL) { return CRYPT_MEM; }
|
||||||
if ((err = poly1305_init(&st, key, keylen)) != CRYPT_OK) { goto LBL_ERR; }
|
if ((err = poly1305_init(&st, key, keylen)) != CRYPT_OK) { goto LBL_ERR; }
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user