-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathFp.java
More file actions
106 lines (83 loc) · 2.55 KB
/
Fp.java
File metadata and controls
106 lines (83 loc) · 2.55 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.2
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.herumi.mcl;
public class Fp {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Fp(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Fp obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
MclJNI.delete_Fp(swigCPtr);
}
swigCPtr = 0;
}
}
public Fp() {
this(MclJNI.new_Fp__SWIG_0(), true);
}
public Fp(Fp rhs) {
this(MclJNI.new_Fp__SWIG_1(Fp.getCPtr(rhs), rhs), true);
}
public Fp(int x) {
this(MclJNI.new_Fp__SWIG_2(x), true);
}
public Fp(String str, int base) {
this(MclJNI.new_Fp__SWIG_3(str, base), true);
}
public Fp(String str) {
this(MclJNI.new_Fp__SWIG_4(str), true);
}
public boolean equals(Fp rhs) {
return MclJNI.Fp_equals(swigCPtr, this, Fp.getCPtr(rhs), rhs);
}
public boolean isZero() {
return MclJNI.Fp_isZero(swigCPtr, this);
}
public boolean isOne() {
return MclJNI.Fp_isOne(swigCPtr, this);
}
public void setStr(String str, int base) {
MclJNI.Fp_setStr__SWIG_0(swigCPtr, this, str, base);
}
public void setStr(String str) {
MclJNI.Fp_setStr__SWIG_1(swigCPtr, this, str);
}
public void setInt(int x) {
MclJNI.Fp_setInt(swigCPtr, this, x);
}
public void clear() {
MclJNI.Fp_clear(swigCPtr, this);
}
public void setByCSPRNG() {
MclJNI.Fp_setByCSPRNG(swigCPtr, this);
}
public String toString(int base) {
return MclJNI.Fp_toString__SWIG_0(swigCPtr, this, base);
}
public String toString() {
return MclJNI.Fp_toString__SWIG_1(swigCPtr, this);
}
public void deserialize(byte[] cbuf) {
MclJNI.Fp_deserialize(swigCPtr, this, cbuf);
}
public byte[] serialize() {
return MclJNI.Fp_serialize(swigCPtr, this);
}
}