Repository navigation
Expand file tree
/
Copy pathICurl.java
More file actions
80 lines (70 loc) · 1.61 KB
/
Copy pathICurl.java
File metadata and controls
80 lines (70 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package jota.pow;
/**
* This interface abstracts the curl hashing algorithm.
*
* @author Adrian
*/
public interface ICurl {
/**
* Absorbs the specified trits.
*
* @param trits The trits.
* @param offset The offset to start from.
* @param length The length.
* @return The ICurl instance (used for method chaining).
*/
ICurl absorb(final int[] trits, int offset, int length);
/**
* Absorbs the specified trits.
*
* @param trits The trits.
* @return The ICurl instance (used for method chaining).
*/
ICurl absorb(final int[] trits);
/**
* Squeezes the specified trits.
*
* @param trits The trits.
* @param offset The offset to start from.
* @param length The length.
* @return The squeezed trits.
*/
int[] squeeze(final int[] trits, int offset, int length);
/**
* Squeezes the specified trits.
*
* @param trits The trits.
* @return The squeezed trits.
*/
int[] squeeze(final int[] trits);
/**
* Transforms this instance.
*
* @return The ICurl instance (used for method chaining).
*/
ICurl transform();
/**
* Resets this state.
*
* @return The ICurl instance (used for method chaining).
*/
ICurl reset();
/**
* Gets or sets the state.
*
* @return The stae.
*/
int[] getState();
/**
* Sets or sets the state.
*
* @param state The state.
*/
void setState(int[] state);
/**
* Clones this instance.
*
* @return A new instance.
*/
ICurl clone();
}