diff options
| author | 2023-04-16 20:27:38 +0200 | |
|---|---|---|
| committer | 2023-04-16 20:27:38 +0200 | |
| commit | 3ccf4e3759684e9809ad80c2f2639ec5f069beff (patch) | |
| tree | 540cd5bdb3e578f208f8d0efef3eaaae211057ea /snac.c | |
| parent | Replaced random() with arc4random(). (diff) | |
| download | penes-snac2-3ccf4e3759684e9809ad80c2f2639ec5f069beff.tar.gz penes-snac2-3ccf4e3759684e9809ad80c2f2639ec5f069beff.tar.xz penes-snac2-3ccf4e3759684e9809ad80c2f2639ec5f069beff.zip | |
arc4random() does not exist in not-so-old systems, so revert this.
Revert "Replaced random() with arc4random()."
This reverts commit f658f345cac7b24d6fa61f08b4ec09823d28b11a.
Diffstat (limited to 'snac.c')
| -rw-r--r-- | snac.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -123,7 +123,7 @@ d_char *hash_password(const char *uid, const char *passwd, const char *nonce) | |||
| 123 | xs *hash; | 123 | xs *hash; |
| 124 | 124 | ||
| 125 | if (nonce == NULL) { | 125 | if (nonce == NULL) { |
| 126 | d_nonce = xs_fmt("%08x", arc4random()); | 126 | d_nonce = xs_fmt("%08x", random()); |
| 127 | nonce = d_nonce; | 127 | nonce = d_nonce; |
| 128 | } | 128 | } |
| 129 | 129 | ||