Skip to content

Commit 3a9ecf4

Browse files
committed
fixed typos
1 parent cc1c17b commit 3a9ecf4

6 files changed

Lines changed: 32 additions & 32 deletions

File tree

‎src/main/java/jota/IotaAPI.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ public GetBundleResponse getBundle(String transaction) throws ArgumentException,
580580
String trxTrytes = Converter.transactionTrytes(trx).substring(2187, 2187 + 162);
581581
//System.out.println("Bundlesize "+bundle.getTransactions().size()+" "+trxTrytes);
582582
// Absorb bundle hash + value + timestamp + lastIndex + currentIndex trytes.
583-
curl.absorbb(Converter.trits(trxTrytes));
583+
curl.absorb(Converter.trits(trxTrytes));
584584
// Check if input transaction
585585
if (bundleValue < 0) {
586586
String address = trx.getAddress();
@@ -605,7 +605,7 @@ public GetBundleResponse getBundle(String transaction) throws ArgumentException,
605605
// Check for total sum, if not equal 0 return error
606606
if (totalSum != 0) throw new InvalidBundleException("Invalid Bundle Sum");
607607
int[] bundleFromTrxs = new int[243];
608-
curl.squeezee(bundleFromTrxs);
608+
curl.squeeze(bundleFromTrxs);
609609
String bundleFromTxString = Converter.trytes(bundleFromTrxs);
610610

611611
// Check if bundle hash is the same as returned by tx object

‎src/main/java/jota/model/Bundle.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ public void finalize(ICurl customCurl) {
6868

6969

7070
int[] t = Converter.trits(this.getTransactions().get(i).getAddress() + Converter.trytes(valueTrits) + this.getTransactions().get(i).getTag() + Converter.trytes(timestampTrits) + Converter.trytes(currentIndexTrits) + Converter.trytes(lastIndexTrits));
71-
curl.absorbb(t, 0, t.length);
71+
curl.absorb(t, 0, t.length);
7272
}
7373

7474
int[] hash = new int[243];
75-
curl.squeezee(hash, 0, hash.length);
75+
curl.squeeze(hash, 0, hash.length);
7676
String hashInTrytes = Converter.trytes(hash);
7777

7878
for (int i = 0; i < this.getTransactions().size(); i++) {

‎src/main/java/jota/pow/ICurl.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
* Created by Adrian on 07.01.2017.
55
*/
66
public interface ICurl {
7-
JCurl absorbb(final int[] trits, int offset, int length);
7+
JCurl absorb(final int[] trits, int offset, int length);
88

9-
JCurl absorbb(final int[] trits);
9+
JCurl absorb(final int[] trits);
1010

11-
int[] squeezee(final int[] trits, int offset, int length);
11+
int[] squeeze(final int[] trits, int offset, int length);
1212

13-
int[] squeezee(final int[] trits);
13+
int[] squeeze(final int[] trits);
1414

1515
JCurl transform();
1616

‎src/main/java/jota/pow/JCurl.java‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class JCurl implements ICurl {
1515

1616
private int[] state = new int[STATE_LENGTH];
1717

18-
public JCurl absorbb(final int[] trits, int offset, int length) {
18+
public JCurl absorb(final int[] trits, int offset, int length) {
1919

2020
do {
2121
System.arraycopy(trits, offset, state, 0, length < HASH_LENGTH ? length : HASH_LENGTH);
@@ -28,8 +28,8 @@ public JCurl absorbb(final int[] trits, int offset, int length) {
2828

2929

3030

31-
public JCurl absorbb(final int[] trits) {
32-
return absorbb(trits, 0, trits.length);
31+
public JCurl absorb(final int[] trits) {
32+
return absorb(trits, 0, trits.length);
3333
}
3434

3535
public JCurl transform() {
@@ -52,7 +52,7 @@ public JCurl reset() {
5252
return this;
5353
}
5454

55-
public int[] squeezee(final int[] trits, int offset, int length) {
55+
public int[] squeeze(final int[] trits, int offset, int length) {
5656

5757
do {
5858
System.arraycopy(state, 0, trits, offset, length < HASH_LENGTH ? length : HASH_LENGTH);
@@ -63,8 +63,8 @@ public int[] squeezee(final int[] trits, int offset, int length) {
6363
return state;
6464
}
6565

66-
public int[] squeezee(final int[] trits) {
67-
return squeezee(trits, 0, trits.length);
66+
public int[] squeeze(final int[] trits) {
67+
return squeeze(trits, 0, trits.length);
6868
}
6969

7070
public int[] getState() {

‎src/main/java/jota/utils/Signing.java‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public int[] key(int[] seed, int index, int length) {
3232
}
3333

3434
curl.reset();
35-
curl.absorbb(seed, 0, seed.length);
36-
curl.squeezee(seed, 0, seed.length);
35+
curl.absorb(seed, 0, seed.length);
36+
curl.squeeze(seed, 0, seed.length);
3737
curl.reset();
38-
curl.absorbb(seed, 0, seed.length);
38+
curl.absorb(seed, 0, seed.length);
3939

4040
final List<Integer> key = new ArrayList<>();
4141
int[] buffer = new int[seed.length];
@@ -44,7 +44,7 @@ public int[] key(int[] seed, int index, int length) {
4444
while (length-- > 0) {
4545

4646
for (int i = 0; i < 27; i++) {
47-
curl.squeezee(buffer, offset, buffer.length);
47+
curl.squeeze(buffer, offset, buffer.length);
4848
for (int j = 0; j < 243; j++) {
4949
key.add(buffer[j]);
5050
}
@@ -72,8 +72,8 @@ public int[] signatureFragment(int[] normalizedBundleFragment, int[] keyFragment
7272

7373
for (int j = 0; j < 13 - normalizedBundleFragment[i]; j++) {
7474
curl.reset()
75-
.absorbb(hash, 0, hash.length)
76-
.squeezee(hash, 0, hash.length);
75+
.absorb(hash, 0, hash.length)
76+
.squeeze(hash, 0, hash.length);
7777
}
7878

7979
for (int j = 0; j < 243; j++) {
@@ -87,8 +87,8 @@ public int[] signatureFragment(int[] normalizedBundleFragment, int[] keyFragment
8787
public int[] address(int[] digests) {
8888
int[] address = new int[243];
8989
curl.reset()
90-
.absorbb(digests)
91-
.squeezee(address);
90+
.absorb(digests)
91+
.squeeze(address);
9292
return address;
9393
}
9494

@@ -105,15 +105,15 @@ public int[] digests(int[] key) {
105105
buffer = Arrays.copyOfRange(keyFragment, j * 243, (j + 1) * 243);
106106
for (int k = 0; k < 26; k++) {
107107
curl.reset()
108-
.absorbb(buffer)
109-
.squeezee(buffer);
108+
.absorb(buffer)
109+
.squeeze(buffer);
110110
}
111111
System.arraycopy(buffer, 0, keyFragment, j * 243, 243);
112112
}
113113

114114
curl.reset();
115-
curl.absorbb(keyFragment, 0, keyFragment.length);
116-
curl.squeezee(buffer, 0, buffer.length);
115+
curl.absorb(keyFragment, 0, keyFragment.length);
116+
curl.squeeze(buffer, 0, buffer.length);
117117

118118
System.arraycopy(buffer, 0, digests, i * 243, 243);
119119
}
@@ -131,12 +131,12 @@ public int[] digest(int[] normalizedBundleFragment, int[] signatureFragment) {
131131

132132
ICurl jCurl = new JCurl();
133133
jCurl.reset();
134-
jCurl.absorbb(buffer);
135-
jCurl.squeezee(buffer);
134+
jCurl.absorb(buffer);
135+
jCurl.squeeze(buffer);
136136
}
137-
curl.absorbb(buffer);
137+
curl.absorb(buffer);
138138
}
139-
curl.squeezee(buffer);
139+
curl.squeeze(buffer);
140140

141141
return buffer;
142142
}

‎src/main/java/jota/utils/TransactionConverter.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public Transaction transactionObject(final String trytes) {
4646

4747
// generate the correct transaction hash
4848
curl.reset();
49-
curl.absorbb(transactionTrits, 0, transactionTrits.length);
50-
curl.squeezee(hash, 0, hash.length);
49+
curl.absorb(transactionTrits, 0, transactionTrits.length);
50+
curl.squeeze(hash, 0, hash.length);
5151

5252
Transaction trx = new Transaction();
5353

0 commit comments

Comments
 (0)