mirror of
https://github.com/openssl/openssl.git
synced 2025-01-07 17:53:38 +08:00
Add CRYPTO_gcm128_tag() function to retrieve the tag.
This commit is contained in:
parent
d45087c672
commit
fd3dbc1dbf
@ -1337,6 +1337,12 @@ int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag,
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
|
||||
{
|
||||
CRYPTO_gcm128_finish(ctx, NULL, 0);
|
||||
memcpy(tag, ctx->Xi.c, len);
|
||||
}
|
||||
|
||||
GCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block)
|
||||
{
|
||||
GCM128_CONTEXT *ret;
|
||||
|
@ -102,4 +102,5 @@ void CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
size_t len, ctr128_f stream);
|
||||
int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag,
|
||||
size_t len);
|
||||
void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len);
|
||||
void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user