commit - fab801a19e2b0cacd281bf38f1d7889ef2ffcc6c
commit + 77987d57d869ab2843dfbd5b2f9e0f1c26b0f583
blob - 71f0f66eaf69014a43ad2c868c8eb716eb252e4a
blob + 0f457f31eef73b486315d42f72898e8a2e61e358
--- config.mk
+++ config.mk
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/man
-INCS = -I/usr/local/include
-LIBS = -L/usr/local/lib -lm -lsodium
-
CC = cc
CPPFLAGS = -D_DEFAULT_SOURCE
-CFLAGS = -std=c99 -Wall -pedantic $(INCS) -O2
-LDFLAGS = $(LIBS)
+CFLAGS = -std=c99 -Wall -pedantic -O2
+LDFLAGS = -lm
-# Debug
-#CFLAGS = -std=c99 -Wall -pedantic $(INCS) -Wextra -O0 -g
-
# Linux
#MANPREFIX = $(PREFIX)/share/man
-#INCS =
-#LIBS = -lm -lsodium
+
+# Debug
+#CFLAGS = -std=c99 -Wall -pedantic -Wextra -O0 -g
blob - 78ac0b578eecc06acd9c2976066f2824afcba822
blob + 720e5d29369c312702fcf3b4ae7dafb6513e335a
--- gpass.c
+++ gpass.c
#include <strings.h>
#include <unistd.h>
-#include <sodium.h>
-
#define MAXWORDS 32768
#ifndef PREFIX
# define PREFIX "/usr/local"
uint32_t n;
for (left = plen; left; left--) {
- n = randombytes_uniform(nwords) + 1;
+ n = arc4random_uniform(nwords) + 1;
if (fseek(dicfp, offs[n], SEEK_SET) == -1)
err(1, "fseek");
while ((c = getc(dicfp)) != EOF && !isspace(c))
if (pledge("stdio unveil rpath", NULL) == -1) /* first call */
err(1, "pledge");
#endif
- if (sodium_init() < 0)
- err(1, "libsodium");
-
while ((c = getopt(argc, argv, "d:e:n:")) != -1) {
switch (c) {
case 'd':