mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
pgcrypto: support changing S2K iteration count
pgcrypto already supports key-stretching during symmetric encryption, including the salted-and-iterated method; but the number of iterations was not configurable. This commit implements a new s2k-count parameter to pgp_sym_encrypt() which permits selecting a larger number of iterations. Author: Jeff Janes
This commit is contained in:
@ -567,7 +567,7 @@ init_s2k_key(PGP_Context *ctx)
|
||||
if (ctx->s2k_cipher_algo < 0)
|
||||
ctx->s2k_cipher_algo = ctx->cipher_algo;
|
||||
|
||||
res = pgp_s2k_fill(&ctx->s2k, ctx->s2k_mode, ctx->s2k_digest_algo);
|
||||
res = pgp_s2k_fill(&ctx->s2k, ctx->s2k_mode, ctx->s2k_digest_algo, ctx->s2k_count);
|
||||
if (res < 0)
|
||||
return res;
|
||||
|
||||
|
Reference in New Issue
Block a user