-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
sha1_hash.java
95 lines (74 loc) · 2.59 KB
/
sha1_hash.java
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.8
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.frostwire.jlibtorrent.swig;
public class sha1_hash {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected sha1_hash(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(sha1_hash obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libtorrent_jni.delete_sha1_hash(swigCPtr);
}
swigCPtr = 0;
}
}
public sha1_hash() {
this(libtorrent_jni.new_sha1_hash__SWIG_0(), true);
}
public static sha1_hash max() {
return new sha1_hash(libtorrent_jni.sha1_hash_max(), true);
}
public static sha1_hash min() {
return new sha1_hash(libtorrent_jni.sha1_hash_min(), true);
}
public void clear() {
libtorrent_jni.sha1_hash_clear(swigCPtr, this);
}
public boolean is_all_zeros() {
return libtorrent_jni.sha1_hash_is_all_zeros(swigCPtr, this);
}
public boolean op_eq(sha1_hash n) {
return libtorrent_jni.sha1_hash_op_eq(swigCPtr, this, sha1_hash.getCPtr(n), n);
}
public boolean op_neq(sha1_hash n) {
return libtorrent_jni.sha1_hash_op_neq(swigCPtr, this, sha1_hash.getCPtr(n), n);
}
public boolean op_lt(sha1_hash n) {
return libtorrent_jni.sha1_hash_op_lt(swigCPtr, this, sha1_hash.getCPtr(n), n);
}
public sha1_hash(byte_vector s) {
this(libtorrent_jni.new_sha1_hash__SWIG_1(byte_vector.getCPtr(s), s), true);
}
public int hash_code() {
return libtorrent_jni.sha1_hash_hash_code(swigCPtr, this);
}
public byte_vector to_bytes() {
return new byte_vector(libtorrent_jni.sha1_hash_to_bytes(swigCPtr, this), true);
}
public String to_hex() {
return libtorrent_jni.sha1_hash_to_hex(swigCPtr, this);
}
public static boolean from_hex(String hex, sha1_hash h) {
return libtorrent_jni.sha1_hash_from_hex(hex, sha1_hash.getCPtr(h), h);
}
public static int compare(sha1_hash h1, sha1_hash h2) {
return libtorrent_jni.sha1_hash_compare(sha1_hash.getCPtr(h1), h1, sha1_hash.getCPtr(h2), h2);
}
public final static int size = libtorrent_jni.sha1_hash_size_get();
}