Skip to content

Commit

Permalink
out_forward: renamed flb_digest to flb_hash
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Aug 12, 2022
1 parent ebdcecf commit 8f3fe9d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions plugins/out_forward/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <fluent-bit/flb_time.h>
#include <fluent-bit/flb_upstream.h>
#include <fluent-bit/flb_upstream_ha.h>
#include <fluent-bit/flb_digest.h>
#include <fluent-bit/flb_hash.h>
#include <fluent-bit/flb_crypto.h>
#include <fluent-bit/flb_config_map.h>
#include <fluent-bit/flb_random.h>
Expand Down Expand Up @@ -184,12 +184,12 @@ static int secure_forward_hash_shared_key(struct flb_forward_config *fc,
data_entries[3] = (unsigned char *) fc->shared_key;
length_entries[3] = strlen(fc->shared_key);

result = flb_digest_simple_batch(FLB_DIGEST_SHA512,
4,
data_entries,
length_entries,
hash,
sizeof(hash));
result = flb_hash_simple_batch(FLB_HASH_SHA512,
4,
data_entries,
length_entries,
hash,
sizeof(hash));

if (result != FLB_CRYPTO_SUCCESS) {
return -1;
Expand Down Expand Up @@ -222,12 +222,12 @@ static int secure_forward_hash_password(struct flb_forward_config *fc,
data_entries[2] = (unsigned char *) fc->password;
length_entries[2] = strlen(fc->password);

result = flb_digest_simple_batch(FLB_DIGEST_SHA512,
3,
data_entries,
length_entries,
hash,
sizeof(hash));
result = flb_hash_simple_batch(FLB_HASH_SHA512,
3,
data_entries,
length_entries,
hash,
sizeof(hash));

if (result != FLB_CRYPTO_SUCCESS) {
return -1;
Expand Down
8 changes: 4 additions & 4 deletions plugins/out_forward/forward_format.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <fluent-bit/flb_output_plugin.h>
#include <fluent-bit/flb_time.h>
#include <fluent-bit/flb_digest.h>
#include <fluent-bit/flb_hash.h>
#include <fluent-bit/flb_crypto.h>
#include <fluent-bit/flb_record_accessor.h>
#include "forward.h"
Expand Down Expand Up @@ -94,9 +94,9 @@ static int append_options(struct flb_forward *ctx,
* for ack we calculate sha512 of context, take 16 bytes,
* make 32 byte hex string of it
*/
result = flb_digest_simple(FLB_DIGEST_SHA512,
data, bytes,
checksum, sizeof(checksum));
result = flb_hash_simple(FLB_HASH_SHA512,
data, bytes,
checksum, sizeof(checksum));

if (result != FLB_CRYPTO_SUCCESS) {
return -1;
Expand Down

0 comments on commit 8f3fe9d

Please sign in to comment.