From 7e4258113cf899ec707e7214dabc91914c5feb63 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Sat, 18 Mar 2017 10:41:29 +0100 Subject: Move SHA1 compress/recompress files to resource folder This fixes Bazel build: in srcs attribute of java_library rule //org.eclipse.jgit:jgit: file '//org.eclipse.jgit:src/org/eclipse/jgit/util/sha1/SHA1.recompress' is misplaced here (expected .java, .srcjar or .properties). Another option that was considered is to exclude the non source files. Change-Id: I7083f27a4a49bf6681c85c7cf7b08a83c9a70c77 Signed-off-by: David Ostrovsky --- .../org/eclipse/jgit/util/sha1/SHA1.compress | 92 ++++++++++ .../org/eclipse/jgit/util/sha1/SHA1.recompress | 192 +++++++++++++++++++++ .../src/org/eclipse/jgit/util/sha1/SHA1.compress | 92 ---------- .../src/org/eclipse/jgit/util/sha1/SHA1.recompress | 192 --------------------- 4 files changed, 284 insertions(+), 284 deletions(-) create mode 100644 org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.compress create mode 100644 org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.recompress delete mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.compress delete mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.recompress (limited to 'org.eclipse.jgit') diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.compress b/org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.compress new file mode 100644 index 0000000000..3a80fd2aaf --- /dev/null +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.compress @@ -0,0 +1,92 @@ +/* Template for compress method; run through cpp. */ + +#define ROUND1_STEP(a, b, c, d, e, T) e += s1(a,b,c,d,w[T]); b = rotateLeft(b, 30) +#define ROUND2_STEP(a, b, c, d, e, T) e += s2(a,b,c,d,w[T]); b = rotateLeft(b, 30) +#define ROUND3_STEP(a, b, c, d, e, T) e += s3(a,b,c,d,w[T]); b = rotateLeft(b, 30) +#define ROUND4_STEP(a, b, c, d, e, T) e += s4(a,b,c,d,w[T]); b = rotateLeft(b, 30) + + ROUND1_STEP(a, b, c, d, e, 0); + ROUND1_STEP(e, a, b, c, d, 1); + ROUND1_STEP(d, e, a, b, c, 2); + ROUND1_STEP(c, d, e, a, b, 3); + ROUND1_STEP(b, c, d, e, a, 4); + ROUND1_STEP(a, b, c, d, e, 5); + ROUND1_STEP(e, a, b, c, d, 6); + ROUND1_STEP(d, e, a, b, c, 7); + ROUND1_STEP(c, d, e, a, b, 8); + ROUND1_STEP(b, c, d, e, a, 9); + ROUND1_STEP(a, b, c, d, e, 10); + ROUND1_STEP(e, a, b, c, d, 11); + ROUND1_STEP(d, e, a, b, c, 12); + ROUND1_STEP(c, d, e, a, b, 13); + ROUND1_STEP(b, c, d, e, a, 14); + ROUND1_STEP(a, b, c, d, e, 15); + ROUND1_STEP(e, a, b, c, d, 16); + ROUND1_STEP(d, e, a, b, c, 17); + ROUND1_STEP(c, d, e, a, b, 18); + ROUND1_STEP(b, c, d, e, a, 19); + + ROUND2_STEP(a, b, c, d, e, 20); + ROUND2_STEP(e, a, b, c, d, 21); + ROUND2_STEP(d, e, a, b, c, 22); + ROUND2_STEP(c, d, e, a, b, 23); + ROUND2_STEP(b, c, d, e, a, 24); + ROUND2_STEP(a, b, c, d, e, 25); + ROUND2_STEP(e, a, b, c, d, 26); + ROUND2_STEP(d, e, a, b, c, 27); + ROUND2_STEP(c, d, e, a, b, 28); + ROUND2_STEP(b, c, d, e, a, 29); + ROUND2_STEP(a, b, c, d, e, 30); + ROUND2_STEP(e, a, b, c, d, 31); + ROUND2_STEP(d, e, a, b, c, 32); + ROUND2_STEP(c, d, e, a, b, 33); + ROUND2_STEP(b, c, d, e, a, 34); + ROUND2_STEP(a, b, c, d, e, 35); + ROUND2_STEP(e, a, b, c, d, 36); + ROUND2_STEP(d, e, a, b, c, 37); + ROUND2_STEP(c, d, e, a, b, 38); + ROUND2_STEP(b, c, d, e, a, 39); + + ROUND3_STEP(a, b, c, d, e, 40); + ROUND3_STEP(e, a, b, c, d, 41); + ROUND3_STEP(d, e, a, b, c, 42); + ROUND3_STEP(c, d, e, a, b, 43); + ROUND3_STEP(b, c, d, e, a, 44); + ROUND3_STEP(a, b, c, d, e, 45); + ROUND3_STEP(e, a, b, c, d, 46); + ROUND3_STEP(d, e, a, b, c, 47); + ROUND3_STEP(c, d, e, a, b, 48); + ROUND3_STEP(b, c, d, e, a, 49); + ROUND3_STEP(a, b, c, d, e, 50); + ROUND3_STEP(e, a, b, c, d, 51); + ROUND3_STEP(d, e, a, b, c, 52); + ROUND3_STEP(c, d, e, a, b, 53); + ROUND3_STEP(b, c, d, e, a, 54); + ROUND3_STEP(a, b, c, d, e, 55); + ROUND3_STEP(e, a, b, c, d, 56); + ROUND3_STEP(d, e, a, b, c, 57); + state58.save(a, b, c, d, e); + ROUND3_STEP(c, d, e, a, b, 58); + ROUND3_STEP(b, c, d, e, a, 59); + + ROUND4_STEP(a, b, c, d, e, 60); + ROUND4_STEP(e, a, b, c, d, 61); + ROUND4_STEP(d, e, a, b, c, 62); + ROUND4_STEP(c, d, e, a, b, 63); + ROUND4_STEP(b, c, d, e, a, 64); + state65.save(a, b, c, d, e); + ROUND4_STEP(a, b, c, d, e, 65); + ROUND4_STEP(e, a, b, c, d, 66); + ROUND4_STEP(d, e, a, b, c, 67); + ROUND4_STEP(c, d, e, a, b, 68); + ROUND4_STEP(b, c, d, e, a, 69); + ROUND4_STEP(a, b, c, d, e, 70); + ROUND4_STEP(e, a, b, c, d, 71); + ROUND4_STEP(d, e, a, b, c, 72); + ROUND4_STEP(c, d, e, a, b, 73); + ROUND4_STEP(b, c, d, e, a, 74); + ROUND4_STEP(a, b, c, d, e, 75); + ROUND4_STEP(e, a, b, c, d, 76); + ROUND4_STEP(d, e, a, b, c, 77); + ROUND4_STEP(c, d, e, a, b, 78); + ROUND4_STEP(b, c, d, e, a, 79); diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.recompress b/org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.recompress new file mode 100644 index 0000000000..44d3d6db84 --- /dev/null +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/util/sha1/SHA1.recompress @@ -0,0 +1,192 @@ +/* Template for recompress method; run through cpp. */ + +#define ROUND1_STEP(a, b, c, d, e, T) {e += s1(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} +#define ROUND2_STEP(a, b, c, d, e, T) {e += s2(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} +#define ROUND3_STEP(a, b, c, d, e, T) {e += s3(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} +#define ROUND4_STEP(a, b, c, d, e, T) {e += s4(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} + +#define ROUND1_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s1(a,b,c,d,w2[T]);} +#define ROUND2_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s2(a,b,c,d,w2[T]);} +#define ROUND3_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s3(a,b,c,d,w2[T]);} +#define ROUND4_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s4(a,b,c,d,w2[T]);} + + /* Condition to go backwards: if (t > step) */ + /* t=80-66 have no identified DV; skip. + ROUND4_STEP_BW(b, c, d, e, a, 79) + ROUND4_STEP_BW(c, d, e, a, b, 78) + ROUND4_STEP_BW(d, e, a, b, c, 77) + ROUND4_STEP_BW(e, a, b, c, d, 76) + ROUND4_STEP_BW(a, b, c, d, e, 75) + ROUND4_STEP_BW(b, c, d, e, a, 74) + ROUND4_STEP_BW(c, d, e, a, b, 73) + ROUND4_STEP_BW(d, e, a, b, c, 72) + ROUND4_STEP_BW(e, a, b, c, d, 71) + ROUND4_STEP_BW(a, b, c, d, e, 70) + ROUND4_STEP_BW(b, c, d, e, a, 69) + ROUND4_STEP_BW(c, d, e, a, b, 68) + ROUND4_STEP_BW(d, e, a, b, c, 67) + ROUND4_STEP_BW(e, a, b, c, d, 66) + ROUND4_STEP_BW(a, b, c, d, e, 65) + */ + if (t == 65) { + ROUND4_STEP_BW(b, c, d, e, a, 64) + ROUND4_STEP_BW(c, d, e, a, b, 63) + ROUND4_STEP_BW(d, e, a, b, c, 62) + ROUND4_STEP_BW(e, a, b, c, d, 61) + ROUND4_STEP_BW(a, b, c, d, e, 60) + + ROUND3_STEP_BW(b, c, d, e, a, 59) + ROUND3_STEP_BW(c, d, e, a, b, 58) + } + ROUND3_STEP_BW(d, e, a, b, c, 57) + ROUND3_STEP_BW(e, a, b, c, d, 56) + ROUND3_STEP_BW(a, b, c, d, e, 55) + ROUND3_STEP_BW(b, c, d, e, a, 54) + ROUND3_STEP_BW(c, d, e, a, b, 53) + ROUND3_STEP_BW(d, e, a, b, c, 52) + ROUND3_STEP_BW(e, a, b, c, d, 51) + ROUND3_STEP_BW(a, b, c, d, e, 50) + ROUND3_STEP_BW(b, c, d, e, a, 49) + ROUND3_STEP_BW(c, d, e, a, b, 48) + ROUND3_STEP_BW(d, e, a, b, c, 47) + ROUND3_STEP_BW(e, a, b, c, d, 46) + ROUND3_STEP_BW(a, b, c, d, e, 45) + ROUND3_STEP_BW(b, c, d, e, a, 44) + ROUND3_STEP_BW(c, d, e, a, b, 43) + ROUND3_STEP_BW(d, e, a, b, c, 42) + ROUND3_STEP_BW(e, a, b, c, d, 41) + ROUND3_STEP_BW(a, b, c, d, e, 40) + + ROUND2_STEP_BW(b, c, d, e, a, 39) + ROUND2_STEP_BW(c, d, e, a, b, 38) + ROUND2_STEP_BW(d, e, a, b, c, 37) + ROUND2_STEP_BW(e, a, b, c, d, 36) + ROUND2_STEP_BW(a, b, c, d, e, 35) + ROUND2_STEP_BW(b, c, d, e, a, 34) + ROUND2_STEP_BW(c, d, e, a, b, 33) + ROUND2_STEP_BW(d, e, a, b, c, 32) + ROUND2_STEP_BW(e, a, b, c, d, 31) + ROUND2_STEP_BW(a, b, c, d, e, 30) + ROUND2_STEP_BW(b, c, d, e, a, 29) + ROUND2_STEP_BW(c, d, e, a, b, 28) + ROUND2_STEP_BW(d, e, a, b, c, 27) + ROUND2_STEP_BW(e, a, b, c, d, 26) + ROUND2_STEP_BW(a, b, c, d, e, 25) + ROUND2_STEP_BW(b, c, d, e, a, 24) + ROUND2_STEP_BW(c, d, e, a, b, 23) + ROUND2_STEP_BW(d, e, a, b, c, 22) + ROUND2_STEP_BW(e, a, b, c, d, 21) + ROUND2_STEP_BW(a, b, c, d, e, 20) + + ROUND1_STEP_BW(b, c, d, e, a, 19) + ROUND1_STEP_BW(c, d, e, a, b, 18) + ROUND1_STEP_BW(d, e, a, b, c, 17) + ROUND1_STEP_BW(e, a, b, c, d, 16) + ROUND1_STEP_BW(a, b, c, d, e, 15) + ROUND1_STEP_BW(b, c, d, e, a, 14) + ROUND1_STEP_BW(c, d, e, a, b, 13) + ROUND1_STEP_BW(d, e, a, b, c, 12) + ROUND1_STEP_BW(e, a, b, c, d, 11) + ROUND1_STEP_BW(a, b, c, d, e, 10) + ROUND1_STEP_BW(b, c, d, e, a, 9) + ROUND1_STEP_BW(c, d, e, a, b, 8) + ROUND1_STEP_BW(d, e, a, b, c, 7) + ROUND1_STEP_BW(e, a, b, c, d, 6) + ROUND1_STEP_BW(a, b, c, d, e, 5) + ROUND1_STEP_BW(b, c, d, e, a, 4) + ROUND1_STEP_BW(c, d, e, a, b, 3) + ROUND1_STEP_BW(d, e, a, b, c, 2) + ROUND1_STEP_BW(e, a, b, c, d, 1) + ROUND1_STEP_BW(a, b, c, d, e, 0) + + hIn.save(a, b, c, d, e); + a = s.a; b = s.b; c = s.c; d = s.d; e = s.e; + + /* Condition to go fowards: if (t <= step) */ + /* Earliest restart is T=58; skip. + ROUND1_STEP(a, b, c, d, e, 0) + ROUND1_STEP(e, a, b, c, d, 1) + ROUND1_STEP(d, e, a, b, c, 2) + ROUND1_STEP(c, d, e, a, b, 3) + ROUND1_STEP(b, c, d, e, a, 4) + ROUND1_STEP(a, b, c, d, e, 5) + ROUND1_STEP(e, a, b, c, d, 6) + ROUND1_STEP(d, e, a, b, c, 7) + ROUND1_STEP(c, d, e, a, b, 8) + ROUND1_STEP(b, c, d, e, a, 9) + ROUND1_STEP(a, b, c, d, e, 10) + ROUND1_STEP(e, a, b, c, d, 11) + ROUND1_STEP(d, e, a, b, c, 12) + ROUND1_STEP(c, d, e, a, b, 13) + ROUND1_STEP(b, c, d, e, a, 14) + ROUND1_STEP(a, b, c, d, e, 15) + ROUND1_STEP(e, a, b, c, d, 16) + ROUND1_STEP(d, e, a, b, c, 17) + ROUND1_STEP(c, d, e, a, b, 18) + ROUND1_STEP(b, c, d, e, a, 19) + + ROUND2_STEP(a, b, c, d, e, 20) + ROUND2_STEP(e, a, b, c, d, 21) + ROUND2_STEP(d, e, a, b, c, 22) + ROUND2_STEP(c, d, e, a, b, 23) + ROUND2_STEP(b, c, d, e, a, 24) + ROUND2_STEP(a, b, c, d, e, 25) + ROUND2_STEP(e, a, b, c, d, 26) + ROUND2_STEP(d, e, a, b, c, 27) + ROUND2_STEP(c, d, e, a, b, 28) + ROUND2_STEP(b, c, d, e, a, 29) + ROUND2_STEP(a, b, c, d, e, 30) + ROUND2_STEP(e, a, b, c, d, 31) + ROUND2_STEP(d, e, a, b, c, 32) + ROUND2_STEP(c, d, e, a, b, 33) + ROUND2_STEP(b, c, d, e, a, 34) + ROUND2_STEP(a, b, c, d, e, 35) + ROUND2_STEP(e, a, b, c, d, 36) + ROUND2_STEP(d, e, a, b, c, 37) + ROUND2_STEP(c, d, e, a, b, 38) + ROUND2_STEP(b, c, d, e, a, 39) + + ROUND3_STEP(a, b, c, d, e, 40) + ROUND3_STEP(e, a, b, c, d, 41) + ROUND3_STEP(d, e, a, b, c, 42) + ROUND3_STEP(c, d, e, a, b, 43) + ROUND3_STEP(b, c, d, e, a, 44) + ROUND3_STEP(a, b, c, d, e, 45) + ROUND3_STEP(e, a, b, c, d, 46) + ROUND3_STEP(d, e, a, b, c, 47) + ROUND3_STEP(c, d, e, a, b, 48) + ROUND3_STEP(b, c, d, e, a, 49) + ROUND3_STEP(a, b, c, d, e, 50) + ROUND3_STEP(e, a, b, c, d, 51) + ROUND3_STEP(d, e, a, b, c, 52) + ROUND3_STEP(c, d, e, a, b, 53) + ROUND3_STEP(b, c, d, e, a, 54) + ROUND3_STEP(a, b, c, d, e, 55) + ROUND3_STEP(e, a, b, c, d, 56) + ROUND3_STEP(d, e, a, b, c, 57) + */ + if (t == 58) { + ROUND3_STEP(c, d, e, a, b, 58) + ROUND3_STEP(b, c, d, e, a, 59) + + ROUND4_STEP(a, b, c, d, e, 60) + ROUND4_STEP(e, a, b, c, d, 61) + ROUND4_STEP(d, e, a, b, c, 62) + ROUND4_STEP(c, d, e, a, b, 63) + ROUND4_STEP(b, c, d, e, a, 64) + } + ROUND4_STEP(a, b, c, d, e, 65) + ROUND4_STEP(e, a, b, c, d, 66) + ROUND4_STEP(d, e, a, b, c, 67) + ROUND4_STEP(c, d, e, a, b, 68) + ROUND4_STEP(b, c, d, e, a, 69) + ROUND4_STEP(a, b, c, d, e, 70) + ROUND4_STEP(e, a, b, c, d, 71) + ROUND4_STEP(d, e, a, b, c, 72) + ROUND4_STEP(c, d, e, a, b, 73) + ROUND4_STEP(b, c, d, e, a, 74) + ROUND4_STEP(a, b, c, d, e, 75) + ROUND4_STEP(e, a, b, c, d, 76) + ROUND4_STEP(d, e, a, b, c, 77) + ROUND4_STEP(c, d, e, a, b, 78) + ROUND4_STEP(b, c, d, e, a, 79) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.compress b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.compress deleted file mode 100644 index 3a80fd2aaf..0000000000 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.compress +++ /dev/null @@ -1,92 +0,0 @@ -/* Template for compress method; run through cpp. */ - -#define ROUND1_STEP(a, b, c, d, e, T) e += s1(a,b,c,d,w[T]); b = rotateLeft(b, 30) -#define ROUND2_STEP(a, b, c, d, e, T) e += s2(a,b,c,d,w[T]); b = rotateLeft(b, 30) -#define ROUND3_STEP(a, b, c, d, e, T) e += s3(a,b,c,d,w[T]); b = rotateLeft(b, 30) -#define ROUND4_STEP(a, b, c, d, e, T) e += s4(a,b,c,d,w[T]); b = rotateLeft(b, 30) - - ROUND1_STEP(a, b, c, d, e, 0); - ROUND1_STEP(e, a, b, c, d, 1); - ROUND1_STEP(d, e, a, b, c, 2); - ROUND1_STEP(c, d, e, a, b, 3); - ROUND1_STEP(b, c, d, e, a, 4); - ROUND1_STEP(a, b, c, d, e, 5); - ROUND1_STEP(e, a, b, c, d, 6); - ROUND1_STEP(d, e, a, b, c, 7); - ROUND1_STEP(c, d, e, a, b, 8); - ROUND1_STEP(b, c, d, e, a, 9); - ROUND1_STEP(a, b, c, d, e, 10); - ROUND1_STEP(e, a, b, c, d, 11); - ROUND1_STEP(d, e, a, b, c, 12); - ROUND1_STEP(c, d, e, a, b, 13); - ROUND1_STEP(b, c, d, e, a, 14); - ROUND1_STEP(a, b, c, d, e, 15); - ROUND1_STEP(e, a, b, c, d, 16); - ROUND1_STEP(d, e, a, b, c, 17); - ROUND1_STEP(c, d, e, a, b, 18); - ROUND1_STEP(b, c, d, e, a, 19); - - ROUND2_STEP(a, b, c, d, e, 20); - ROUND2_STEP(e, a, b, c, d, 21); - ROUND2_STEP(d, e, a, b, c, 22); - ROUND2_STEP(c, d, e, a, b, 23); - ROUND2_STEP(b, c, d, e, a, 24); - ROUND2_STEP(a, b, c, d, e, 25); - ROUND2_STEP(e, a, b, c, d, 26); - ROUND2_STEP(d, e, a, b, c, 27); - ROUND2_STEP(c, d, e, a, b, 28); - ROUND2_STEP(b, c, d, e, a, 29); - ROUND2_STEP(a, b, c, d, e, 30); - ROUND2_STEP(e, a, b, c, d, 31); - ROUND2_STEP(d, e, a, b, c, 32); - ROUND2_STEP(c, d, e, a, b, 33); - ROUND2_STEP(b, c, d, e, a, 34); - ROUND2_STEP(a, b, c, d, e, 35); - ROUND2_STEP(e, a, b, c, d, 36); - ROUND2_STEP(d, e, a, b, c, 37); - ROUND2_STEP(c, d, e, a, b, 38); - ROUND2_STEP(b, c, d, e, a, 39); - - ROUND3_STEP(a, b, c, d, e, 40); - ROUND3_STEP(e, a, b, c, d, 41); - ROUND3_STEP(d, e, a, b, c, 42); - ROUND3_STEP(c, d, e, a, b, 43); - ROUND3_STEP(b, c, d, e, a, 44); - ROUND3_STEP(a, b, c, d, e, 45); - ROUND3_STEP(e, a, b, c, d, 46); - ROUND3_STEP(d, e, a, b, c, 47); - ROUND3_STEP(c, d, e, a, b, 48); - ROUND3_STEP(b, c, d, e, a, 49); - ROUND3_STEP(a, b, c, d, e, 50); - ROUND3_STEP(e, a, b, c, d, 51); - ROUND3_STEP(d, e, a, b, c, 52); - ROUND3_STEP(c, d, e, a, b, 53); - ROUND3_STEP(b, c, d, e, a, 54); - ROUND3_STEP(a, b, c, d, e, 55); - ROUND3_STEP(e, a, b, c, d, 56); - ROUND3_STEP(d, e, a, b, c, 57); - state58.save(a, b, c, d, e); - ROUND3_STEP(c, d, e, a, b, 58); - ROUND3_STEP(b, c, d, e, a, 59); - - ROUND4_STEP(a, b, c, d, e, 60); - ROUND4_STEP(e, a, b, c, d, 61); - ROUND4_STEP(d, e, a, b, c, 62); - ROUND4_STEP(c, d, e, a, b, 63); - ROUND4_STEP(b, c, d, e, a, 64); - state65.save(a, b, c, d, e); - ROUND4_STEP(a, b, c, d, e, 65); - ROUND4_STEP(e, a, b, c, d, 66); - ROUND4_STEP(d, e, a, b, c, 67); - ROUND4_STEP(c, d, e, a, b, 68); - ROUND4_STEP(b, c, d, e, a, 69); - ROUND4_STEP(a, b, c, d, e, 70); - ROUND4_STEP(e, a, b, c, d, 71); - ROUND4_STEP(d, e, a, b, c, 72); - ROUND4_STEP(c, d, e, a, b, 73); - ROUND4_STEP(b, c, d, e, a, 74); - ROUND4_STEP(a, b, c, d, e, 75); - ROUND4_STEP(e, a, b, c, d, 76); - ROUND4_STEP(d, e, a, b, c, 77); - ROUND4_STEP(c, d, e, a, b, 78); - ROUND4_STEP(b, c, d, e, a, 79); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.recompress b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.recompress deleted file mode 100644 index 44d3d6db84..0000000000 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.recompress +++ /dev/null @@ -1,192 +0,0 @@ -/* Template for recompress method; run through cpp. */ - -#define ROUND1_STEP(a, b, c, d, e, T) {e += s1(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} -#define ROUND2_STEP(a, b, c, d, e, T) {e += s2(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} -#define ROUND3_STEP(a, b, c, d, e, T) {e += s3(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} -#define ROUND4_STEP(a, b, c, d, e, T) {e += s4(a,b,c,d,w2[T]); b = rotateLeft(b, 30);} - -#define ROUND1_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s1(a,b,c,d,w2[T]);} -#define ROUND2_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s2(a,b,c,d,w2[T]);} -#define ROUND3_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s3(a,b,c,d,w2[T]);} -#define ROUND4_STEP_BW(a, b, c, d, e, T) {b = rotateRight(b, 30); e -= s4(a,b,c,d,w2[T]);} - - /* Condition to go backwards: if (t > step) */ - /* t=80-66 have no identified DV; skip. - ROUND4_STEP_BW(b, c, d, e, a, 79) - ROUND4_STEP_BW(c, d, e, a, b, 78) - ROUND4_STEP_BW(d, e, a, b, c, 77) - ROUND4_STEP_BW(e, a, b, c, d, 76) - ROUND4_STEP_BW(a, b, c, d, e, 75) - ROUND4_STEP_BW(b, c, d, e, a, 74) - ROUND4_STEP_BW(c, d, e, a, b, 73) - ROUND4_STEP_BW(d, e, a, b, c, 72) - ROUND4_STEP_BW(e, a, b, c, d, 71) - ROUND4_STEP_BW(a, b, c, d, e, 70) - ROUND4_STEP_BW(b, c, d, e, a, 69) - ROUND4_STEP_BW(c, d, e, a, b, 68) - ROUND4_STEP_BW(d, e, a, b, c, 67) - ROUND4_STEP_BW(e, a, b, c, d, 66) - ROUND4_STEP_BW(a, b, c, d, e, 65) - */ - if (t == 65) { - ROUND4_STEP_BW(b, c, d, e, a, 64) - ROUND4_STEP_BW(c, d, e, a, b, 63) - ROUND4_STEP_BW(d, e, a, b, c, 62) - ROUND4_STEP_BW(e, a, b, c, d, 61) - ROUND4_STEP_BW(a, b, c, d, e, 60) - - ROUND3_STEP_BW(b, c, d, e, a, 59) - ROUND3_STEP_BW(c, d, e, a, b, 58) - } - ROUND3_STEP_BW(d, e, a, b, c, 57) - ROUND3_STEP_BW(e, a, b, c, d, 56) - ROUND3_STEP_BW(a, b, c, d, e, 55) - ROUND3_STEP_BW(b, c, d, e, a, 54) - ROUND3_STEP_BW(c, d, e, a, b, 53) - ROUND3_STEP_BW(d, e, a, b, c, 52) - ROUND3_STEP_BW(e, a, b, c, d, 51) - ROUND3_STEP_BW(a, b, c, d, e, 50) - ROUND3_STEP_BW(b, c, d, e, a, 49) - ROUND3_STEP_BW(c, d, e, a, b, 48) - ROUND3_STEP_BW(d, e, a, b, c, 47) - ROUND3_STEP_BW(e, a, b, c, d, 46) - ROUND3_STEP_BW(a, b, c, d, e, 45) - ROUND3_STEP_BW(b, c, d, e, a, 44) - ROUND3_STEP_BW(c, d, e, a, b, 43) - ROUND3_STEP_BW(d, e, a, b, c, 42) - ROUND3_STEP_BW(e, a, b, c, d, 41) - ROUND3_STEP_BW(a, b, c, d, e, 40) - - ROUND2_STEP_BW(b, c, d, e, a, 39) - ROUND2_STEP_BW(c, d, e, a, b, 38) - ROUND2_STEP_BW(d, e, a, b, c, 37) - ROUND2_STEP_BW(e, a, b, c, d, 36) - ROUND2_STEP_BW(a, b, c, d, e, 35) - ROUND2_STEP_BW(b, c, d, e, a, 34) - ROUND2_STEP_BW(c, d, e, a, b, 33) - ROUND2_STEP_BW(d, e, a, b, c, 32) - ROUND2_STEP_BW(e, a, b, c, d, 31) - ROUND2_STEP_BW(a, b, c, d, e, 30) - ROUND2_STEP_BW(b, c, d, e, a, 29) - ROUND2_STEP_BW(c, d, e, a, b, 28) - ROUND2_STEP_BW(d, e, a, b, c, 27) - ROUND2_STEP_BW(e, a, b, c, d, 26) - ROUND2_STEP_BW(a, b, c, d, e, 25) - ROUND2_STEP_BW(b, c, d, e, a, 24) - ROUND2_STEP_BW(c, d, e, a, b, 23) - ROUND2_STEP_BW(d, e, a, b, c, 22) - ROUND2_STEP_BW(e, a, b, c, d, 21) - ROUND2_STEP_BW(a, b, c, d, e, 20) - - ROUND1_STEP_BW(b, c, d, e, a, 19) - ROUND1_STEP_BW(c, d, e, a, b, 18) - ROUND1_STEP_BW(d, e, a, b, c, 17) - ROUND1_STEP_BW(e, a, b, c, d, 16) - ROUND1_STEP_BW(a, b, c, d, e, 15) - ROUND1_STEP_BW(b, c, d, e, a, 14) - ROUND1_STEP_BW(c, d, e, a, b, 13) - ROUND1_STEP_BW(d, e, a, b, c, 12) - ROUND1_STEP_BW(e, a, b, c, d, 11) - ROUND1_STEP_BW(a, b, c, d, e, 10) - ROUND1_STEP_BW(b, c, d, e, a, 9) - ROUND1_STEP_BW(c, d, e, a, b, 8) - ROUND1_STEP_BW(d, e, a, b, c, 7) - ROUND1_STEP_BW(e, a, b, c, d, 6) - ROUND1_STEP_BW(a, b, c, d, e, 5) - ROUND1_STEP_BW(b, c, d, e, a, 4) - ROUND1_STEP_BW(c, d, e, a, b, 3) - ROUND1_STEP_BW(d, e, a, b, c, 2) - ROUND1_STEP_BW(e, a, b, c, d, 1) - ROUND1_STEP_BW(a, b, c, d, e, 0) - - hIn.save(a, b, c, d, e); - a = s.a; b = s.b; c = s.c; d = s.d; e = s.e; - - /* Condition to go fowards: if (t <= step) */ - /* Earliest restart is T=58; skip. - ROUND1_STEP(a, b, c, d, e, 0) - ROUND1_STEP(e, a, b, c, d, 1) - ROUND1_STEP(d, e, a, b, c, 2) - ROUND1_STEP(c, d, e, a, b, 3) - ROUND1_STEP(b, c, d, e, a, 4) - ROUND1_STEP(a, b, c, d, e, 5) - ROUND1_STEP(e, a, b, c, d, 6) - ROUND1_STEP(d, e, a, b, c, 7) - ROUND1_STEP(c, d, e, a, b, 8) - ROUND1_STEP(b, c, d, e, a, 9) - ROUND1_STEP(a, b, c, d, e, 10) - ROUND1_STEP(e, a, b, c, d, 11) - ROUND1_STEP(d, e, a, b, c, 12) - ROUND1_STEP(c, d, e, a, b, 13) - ROUND1_STEP(b, c, d, e, a, 14) - ROUND1_STEP(a, b, c, d, e, 15) - ROUND1_STEP(e, a, b, c, d, 16) - ROUND1_STEP(d, e, a, b, c, 17) - ROUND1_STEP(c, d, e, a, b, 18) - ROUND1_STEP(b, c, d, e, a, 19) - - ROUND2_STEP(a, b, c, d, e, 20) - ROUND2_STEP(e, a, b, c, d, 21) - ROUND2_STEP(d, e, a, b, c, 22) - ROUND2_STEP(c, d, e, a, b, 23) - ROUND2_STEP(b, c, d, e, a, 24) - ROUND2_STEP(a, b, c, d, e, 25) - ROUND2_STEP(e, a, b, c, d, 26) - ROUND2_STEP(d, e, a, b, c, 27) - ROUND2_STEP(c, d, e, a, b, 28) - ROUND2_STEP(b, c, d, e, a, 29) - ROUND2_STEP(a, b, c, d, e, 30) - ROUND2_STEP(e, a, b, c, d, 31) - ROUND2_STEP(d, e, a, b, c, 32) - ROUND2_STEP(c, d, e, a, b, 33) - ROUND2_STEP(b, c, d, e, a, 34) - ROUND2_STEP(a, b, c, d, e, 35) - ROUND2_STEP(e, a, b, c, d, 36) - ROUND2_STEP(d, e, a, b, c, 37) - ROUND2_STEP(c, d, e, a, b, 38) - ROUND2_STEP(b, c, d, e, a, 39) - - ROUND3_STEP(a, b, c, d, e, 40) - ROUND3_STEP(e, a, b, c, d, 41) - ROUND3_STEP(d, e, a, b, c, 42) - ROUND3_STEP(c, d, e, a, b, 43) - ROUND3_STEP(b, c, d, e, a, 44) - ROUND3_STEP(a, b, c, d, e, 45) - ROUND3_STEP(e, a, b, c, d, 46) - ROUND3_STEP(d, e, a, b, c, 47) - ROUND3_STEP(c, d, e, a, b, 48) - ROUND3_STEP(b, c, d, e, a, 49) - ROUND3_STEP(a, b, c, d, e, 50) - ROUND3_STEP(e, a, b, c, d, 51) - ROUND3_STEP(d, e, a, b, c, 52) - ROUND3_STEP(c, d, e, a, b, 53) - ROUND3_STEP(b, c, d, e, a, 54) - ROUND3_STEP(a, b, c, d, e, 55) - ROUND3_STEP(e, a, b, c, d, 56) - ROUND3_STEP(d, e, a, b, c, 57) - */ - if (t == 58) { - ROUND3_STEP(c, d, e, a, b, 58) - ROUND3_STEP(b, c, d, e, a, 59) - - ROUND4_STEP(a, b, c, d, e, 60) - ROUND4_STEP(e, a, b, c, d, 61) - ROUND4_STEP(d, e, a, b, c, 62) - ROUND4_STEP(c, d, e, a, b, 63) - ROUND4_STEP(b, c, d, e, a, 64) - } - ROUND4_STEP(a, b, c, d, e, 65) - ROUND4_STEP(e, a, b, c, d, 66) - ROUND4_STEP(d, e, a, b, c, 67) - ROUND4_STEP(c, d, e, a, b, 68) - ROUND4_STEP(b, c, d, e, a, 69) - ROUND4_STEP(a, b, c, d, e, 70) - ROUND4_STEP(e, a, b, c, d, 71) - ROUND4_STEP(d, e, a, b, c, 72) - ROUND4_STEP(c, d, e, a, b, 73) - ROUND4_STEP(b, c, d, e, a, 74) - ROUND4_STEP(a, b, c, d, e, 75) - ROUND4_STEP(e, a, b, c, d, 76) - ROUND4_STEP(d, e, a, b, c, 77) - ROUND4_STEP(c, d, e, a, b, 78) - ROUND4_STEP(b, c, d, e, a, 79) -- cgit v1.2.3