Mercurial > vim
comparison src/evalfunc.c @ 31379:540e85ac14c9 v9.0.1023
patch 9.0.1023: MS-Windows: dynamic loading of libsodium doesn't work
Commit: https://github.com/vim/vim/commit/a8cdb4eef83bce8614991f1191f8c8879fda4dc1
Author: K.Takata <kentkt@csc.jp>
Date: Tue Dec 6 16:17:01 2022 +0000
patch 9.0.1023: MS-Windows: dynamic loading of libsodium doesn't work
Problem: MS-Windows: dynamic loading of libsodium doesn't work.
Solution: Add "randombytes_random". (Ken Takata, closes https://github.com/vim/vim/issues/11667)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 06 Dec 2022 17:30:04 +0100 |
parents | 0608de106485 |
children | 307f68a41b03 |
comparison
equal
deleted
inserted
replaced
31378:c6c4336ac00d | 31379:540e85ac14c9 |
---|---|
8164 // Reading /dev/urandom doesn't work, fall back to: | 8164 // Reading /dev/urandom doesn't work, fall back to: |
8165 // - randombytes_random() | 8165 // - randombytes_random() |
8166 // - reltime() or time() | 8166 // - reltime() or time() |
8167 // - XOR with process ID | 8167 // - XOR with process ID |
8168 #if defined(FEAT_SODIUM) | 8168 #if defined(FEAT_SODIUM) |
8169 if (sodium_init() >= 0) | 8169 if (crypt_sodium_init() >= 0) |
8170 *x = randombytes_random(); | 8170 *x = crypt_sodium_randombytes_random(); |
8171 else | 8171 else |
8172 #endif | 8172 #endif |
8173 { | 8173 { |
8174 #if defined(FEAT_RELTIME) | 8174 #if defined(FEAT_RELTIME) |
8175 proftime_T res; | 8175 proftime_T res; |