MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_md5_binary

Function pg_md5_binary

src/common/md5_common.c:92–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool
93pg_md5_binary(const void *buff, size_t len, void *outbuf)
94{
95 pg_cryptohash_ctx *ctx;
96
97 ctx = pg_cryptohash_create(PG_MD5);
98 if (ctx == NULL)
99 return false;
100
101 if (pg_cryptohash_init(ctx) < 0 ||
102 pg_cryptohash_update(ctx, buff, len) < 0 ||
103 pg_cryptohash_final(ctx, outbuf, MD5_DIGEST_LENGTH) < 0)
104 {
105 pg_cryptohash_free(ctx);
106 return false;
107 }
108
109 pg_cryptohash_free(ctx);
110 return true;
111}
112
113
114/*

Callers 1

PerformRadiusTransactionFunction · 0.85

Calls 5

pg_cryptohash_createFunction · 0.70
pg_cryptohash_initFunction · 0.70
pg_cryptohash_updateFunction · 0.70
pg_cryptohash_finalFunction · 0.70
pg_cryptohash_freeFunction · 0.70

Tested by

no test coverage detected