sha3 0.2.2 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sha3 might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/.gitignore +232 -17
- data/.travis.yml +21 -12
- data/.yardopts +1 -1
- data/ChangeLog.rdoc +16 -0
- data/Gemfile +1 -1
- data/Gemfile.ci +5 -5
- data/LICENSE.txt +1 -1
- data/README.md +120 -0
- data/Rakefile +15 -18
- data/ext/sha3/KeccakF-1600-interface.h +28 -34
- data/ext/sha3/KeccakHash.c +80 -0
- data/ext/sha3/KeccakHash.h +110 -0
- data/ext/sha3/KeccakSponge.c +127 -201
- data/ext/sha3/KeccakSponge.h +74 -37
- data/ext/sha3/Optimized64/KeccakF-1600-64.macros +2199 -0
- data/ext/sha3/Optimized64/KeccakF-1600-opt64-settings.h +3 -0
- data/ext/sha3/Optimized64/KeccakF-1600-opt64.c +508 -0
- data/ext/sha3/{KeccakF-1600-unrolling.macros → Optimized64/KeccakF-1600-unrolling.macros} +16 -14
- data/ext/sha3/Optimized64/SnP-interface.h +47 -0
- data/ext/sha3/Reference/KeccakF-1600-reference.c +311 -0
- data/ext/sha3/Reference/KeccakF-reference.h +26 -0
- data/ext/sha3/Reference/SnP-FBWL-default.c +96 -0
- data/ext/sha3/Reference/SnP-FBWL-default.h +26 -0
- data/ext/sha3/Reference/SnP-interface.h +42 -0
- data/ext/sha3/{displayIntermediateValues.c → Reference/displayIntermediateValues.c} +52 -11
- data/ext/sha3/{displayIntermediateValues.h → Reference/displayIntermediateValues.h} +11 -6
- data/ext/sha3/SnP-Relaned.h +249 -0
- data/ext/sha3/brg_endian.h +0 -0
- data/ext/sha3/digest.c +270 -0
- data/ext/sha3/digest.h +48 -0
- data/ext/sha3/extconf.rb +16 -9
- data/ext/sha3/sha3.c +62 -0
- data/ext/sha3/sha3.h +26 -0
- data/lib/sha3.rb +1 -1
- data/lib/sha3/doc.rb +121 -0
- data/lib/sha3/version.rb +6 -5
- data/sha3.gemspec +13 -15
- data/spec/generate_tests.rb +22 -56
- data/spec/sha3_core_spec.rb +113 -133
- data/spec/spec_helper.rb +2 -2
- data/tests.sh +11 -9
- metadata +53 -65
- data/README.rdoc +0 -133
- data/ext/sha3/KeccakF-1600-32-rvk.macros +0 -555
- data/ext/sha3/KeccakF-1600-32-s1.macros +0 -1187
- data/ext/sha3/KeccakF-1600-32-s2.macros +0 -1187
- data/ext/sha3/KeccakF-1600-32.macros +0 -26
- data/ext/sha3/KeccakF-1600-64.macros +0 -728
- data/ext/sha3/KeccakF-1600-int-set.h +0 -6
- data/ext/sha3/KeccakF-1600-opt.c +0 -504
- data/ext/sha3/KeccakF-1600-opt32-settings.h +0 -4
- data/ext/sha3/KeccakF-1600-opt32.c-arch +0 -524
- data/ext/sha3/KeccakF-1600-opt64-settings.h +0 -7
- data/ext/sha3/KeccakF-1600-opt64.c-arch +0 -504
- data/ext/sha3/KeccakF-1600-reference.c-arch +0 -300
- data/ext/sha3/KeccakF-1600-x86-64-gas.s +0 -766
- data/ext/sha3/KeccakF-1600-x86-64-shld-gas.s +0 -766
- data/ext/sha3/KeccakNISTInterface.c +0 -81
- data/ext/sha3/KeccakNISTInterface.h +0 -70
- data/ext/sha3/_sha3.c +0 -309
- data/ext/sha3/_sha3.h +0 -32
data/ext/sha3/_sha3.h
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#ifndef __SHA3_H_
|
2
|
-
#define __SHA3_H_
|
3
|
-
|
4
|
-
#include <ruby.h>
|
5
|
-
#include "KeccakNISTInterface.h"
|
6
|
-
|
7
|
-
// From ruby/ext/openssl/ossl_digest.c
|
8
|
-
#define GETMDX(obj, mdx) do { \
|
9
|
-
Data_Get_Struct((obj), MDX, (mdx)); \
|
10
|
-
if (!(mdx)) { \
|
11
|
-
rb_raise(rb_eRuntimeError, "Digest data not initialized!"); \
|
12
|
-
} \
|
13
|
-
} while (0)
|
14
|
-
|
15
|
-
#define SAFEGETMDX(obj, mdx) do { \
|
16
|
-
if (!rb_obj_is_kind_of(obj, cDigest)) { \
|
17
|
-
rb_raise(rb_eTypeError, "wrong argument (%s)! (expected %s)",\
|
18
|
-
rb_obj_classname(obj), rb_class2name(cDigest)); \
|
19
|
-
} \
|
20
|
-
GETMDX(obj, mdx); \
|
21
|
-
} while(0)
|
22
|
-
|
23
|
-
VALUE mSHA3;
|
24
|
-
VALUE cDigest;
|
25
|
-
VALUE eDigestError;
|
26
|
-
|
27
|
-
typedef struct {
|
28
|
-
hashState *state;
|
29
|
-
int hashbitlen;
|
30
|
-
} MDX;
|
31
|
-
|
32
|
-
#endif
|