+ crypto_onetimeauth streaming interface
This commit is contained in:
parent
4df5a1b404
commit
9cba9c39e3
@ -32,3 +32,28 @@ crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
|
|||||||
{
|
{
|
||||||
return crypto_onetimeauth_poly1305_verify(h, in, inlen, k);
|
return crypto_onetimeauth_poly1305_verify(h, in, inlen, k);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
crypto_onetimeauth_init(crypto_onetimeauth_state *state,
|
||||||
|
const unsigned char *key)
|
||||||
|
{
|
||||||
|
return crypto_onetimeauth_poly1305_init
|
||||||
|
((crypto_onetimeauth_poly1305_state *) state, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
crypto_onetimeauth_update(crypto_onetimeauth_state *state,
|
||||||
|
const unsigned char *in,
|
||||||
|
unsigned long long inlen)
|
||||||
|
{
|
||||||
|
return crypto_onetimeauth_poly1305_update
|
||||||
|
((crypto_onetimeauth_poly1305_state *) state, in, inlen);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
crypto_onetimeauth_final(crypto_onetimeauth_state *state,
|
||||||
|
unsigned char *out)
|
||||||
|
{
|
||||||
|
return crypto_onetimeauth_poly1305_final
|
||||||
|
((crypto_onetimeauth_poly1305_state *) state, out);
|
||||||
|
}
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef crypto_onetimeauth_poly1305_state crypto_onetimeauth_state;
|
||||||
|
|
||||||
#define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES
|
#define crypto_onetimeauth_BYTES crypto_onetimeauth_poly1305_BYTES
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
size_t crypto_onetimeauth_bytes(void);
|
size_t crypto_onetimeauth_bytes(void);
|
||||||
@ -33,6 +35,19 @@ SODIUM_EXPORT
|
|||||||
int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
|
int crypto_onetimeauth_verify(const unsigned char *h, const unsigned char *in,
|
||||||
unsigned long long inlen, const unsigned char *k);
|
unsigned long long inlen, const unsigned char *k);
|
||||||
|
|
||||||
|
SODIUM_EXPORT
|
||||||
|
int crypto_onetimeauth_init(crypto_onetimeauth_state *state,
|
||||||
|
const unsigned char *key);
|
||||||
|
|
||||||
|
SODIUM_EXPORT
|
||||||
|
int crypto_onetimeauth_update(crypto_onetimeauth_state *state,
|
||||||
|
const unsigned char *in,
|
||||||
|
unsigned long long inlen);
|
||||||
|
|
||||||
|
SODIUM_EXPORT
|
||||||
|
int crypto_onetimeauth_final(crypto_onetimeauth_state *state,
|
||||||
|
unsigned char *out);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user