mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
make it C89-friendly
This commit is contained in:
1 parent
bf059ad42f
commit
52ab6bc499
4 files changed
+311
-293
No files matched your search
+2
-1
@@ -1576,11 +1576,12 @@ NS_INTERNAL bigint *bi_crt(BI_CTX *ctx, bigint *bi, bigint *dP, bigint *dQ,
|
||||
|
||||
int mg_rsa_mod_pow(const uint8_t *mod, size_t modsz, const uint8_t *exp, size_t expsz, const uint8_t *msg, size_t msgsz, uint8_t *out, size_t outsz) {
|
||||
BI_CTX *bi_ctx = bi_initialize();
|
||||
bigint *m1;
|
||||
bigint *n = bi_import(bi_ctx, mod, (int) modsz);
|
||||
bigint *e = bi_import(bi_ctx, exp, (int) expsz);
|
||||
bigint *h = bi_import(bi_ctx, msg, (int) msgsz);
|
||||
bi_set_mod(bi_ctx, n, 0);
|
||||
bigint *m1 = bi_mod_power(bi_ctx, h, e);
|
||||
m1 = bi_mod_power(bi_ctx, h, e);
|
||||
bi_free_mod(bi_ctx, 0);
|
||||
bi_export(bi_ctx, m1, out, (int) outsz);
|
||||
bi_terminate(bi_ctx);
|
||||
|
||||
Reference in new issue
Block a user