diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-11 07:33:16 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-11 07:33:16 +0100 |
commit | 46175e0dc6ae90a99049b78f05a8d76675013058 (patch) | |
tree | 998356ca0a3d7765bed1d4afc9e9144270e1ecdc /c/sha3sum.c | |
parent | bump year (diff) | |
download | sha3sum-46175e0dc6ae90a99049b78f05a8d76675013058.tar.gz sha3sum-46175e0dc6ae90a99049b78f05a8d76675013058.tar.bz2 sha3sum-46175e0dc6ae90a99049b78f05a8d76675013058.tar.xz |
namespace c version
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | c/sha3sum.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/c/sha3sum.c b/c/sha3sum.c index e641e68..8579c31 100644 --- a/c/sha3sum.c +++ b/c/sha3sum.c @@ -579,7 +579,7 @@ int main(int argc, char** argv) if ((filename != null) || (stdin == null)) { - initialise(r, c, o); + sha3_initialise(r, c, o); blksize = stat(*(argv + f), &attr) ? 0 : attr.st_blksize; if (blksize <= 0) blksize = 4096; @@ -590,7 +590,7 @@ int main(int argc, char** argv) if (read <= 0) break; if (hex == false) - update(chunk, read); + sha3_update(chunk, read); else { int n = read >> 1; @@ -601,15 +601,15 @@ int main(int argc, char** argv) b = (b & 15) + (b <= '9' ? 0 : 9); *(chunk + _) = (a << 4) | b; } - update(chunk, n); + sha3_update(chunk, n); } } - bs = digest(null, 0, j == 1); + bs = sha3_digest(null, 0, j == 1); if (j > 2) - fastSqueeze(j - 2); + sha3_fastSqueeze(j - 2); if (j > 1) - bs = squeeze(); - dispose(); + bs = sha3_squeeze(); + sha3_dispose(); if (filename == null) { @@ -626,14 +626,14 @@ int main(int argc, char** argv) for (_ = 1; _ < i; _++) { byte* _bs = bs; - initialise(r, c, o); - bs = digest(bs, bn, j == 1); + sha3_initialise(r, c, o); + bs = sha3_digest(bs, bn, j == 1); if (j > 2) - fastSqueeze(j - 2); + sha3_fastSqueeze(j - 2); if (j > 1) - bs = squeeze(); + bs = sha3_squeeze(); free(_bs); - dispose(); + sha3_dispose(); } if (binary) putchars((char*)bs, bn); @@ -669,14 +669,14 @@ int main(int argc, char** argv) for (_ = 1; _ < i; _++) { byte* _bs = bs; - initialise(r, c, o); - bs = digest(bs, bn, j == 1); + sha3_initialise(r, c, o); + bs = sha3_digest(bs, bn, j == 1); if (j > 2) - fastSqueeze(j - 2); + sha3_fastSqueeze(j - 2); if (j > 1) - bs = squeeze(); + bs = sha3_squeeze(); free(_bs); - dispose(); + sha3_dispose(); if (binary) putchars((char*)bs, bn); else @@ -703,14 +703,14 @@ int main(int argc, char** argv) if (_ > 0) { byte* _bs = bs; - initialise(r, c, o); - bs = digest(bs, bn, j == 1); + sha3_initialise(r, c, o); + bs = sha3_digest(bs, bn, j == 1); if (j > 2) - fastSqueeze(j - 2); + sha3_fastSqueeze(j - 2); if (j > 1) - bs = squeeze(); + bs = sha3_squeeze(); free(_bs); - dispose(); + sha3_dispose(); } for (b = 0; b < bn; b++) { |