forked from Asherda/Go-VerusHash
-
Notifications
You must be signed in to change notification settings - Fork 2
/
verushash.go
230 lines (192 loc) · 7.39 KB
/
verushash.go
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */
// source: verushash.i
package verushash
/*
#define intgo swig_intgo
typedef void *swig_voidp;
#include <stdint.h>
typedef long long intgo;
typedef unsigned long long uintgo;
typedef struct { char *p; intgo n; } _gostring_;
typedef struct { void* array; intgo len; intgo cap; } _goslice_;
typedef long long swig_type_1;
typedef _gostring_ swig_type_2;
#cgo LDFLAGS: -L${SRCDIR} -l:libverushash.a -lsodium
typedef _gostring_ swig_type_3;
typedef _gostring_ swig_type_4;
typedef _gostring_ swig_type_5;
typedef _gostring_ swig_type_6;
typedef _gostring_ swig_type_7;
extern void _wrap_Swig_free_verushash_03acba9066aad4fc(uintptr_t arg1);
extern uintptr_t _wrap_Swig_malloc_verushash_03acba9066aad4fc(swig_intgo arg1);
extern swig_type_1 _wrap_cdata_verushash_03acba9066aad4fc(intgo _swig_args, uintptr_t arg1, swig_intgo arg2);
extern void _wrap_memmove_verushash_03acba9066aad4fc(uintptr_t arg1, swig_type_2 arg2, swig_intgo arg3);
extern void _wrap_Verushash_initialized_set_verushash_03acba9066aad4fc(uintptr_t arg1, _Bool arg2);
extern _Bool _wrap_Verushash_initialized_get_verushash_03acba9066aad4fc(uintptr_t arg1);
extern void _wrap_Verushash_initialize_verushash_03acba9066aad4fc(uintptr_t arg1);
extern void _wrap_Verushash_verushash_verushash_03acba9066aad4fc(uintptr_t arg1, swig_type_3 arg2, swig_intgo arg3, uintptr_t arg4);
extern void _wrap_Verushash_verushash_v2_verushash_03acba9066aad4fc(uintptr_t arg1, swig_type_4 arg2, swig_intgo arg3, uintptr_t arg4);
extern void _wrap_Verushash_verushash_v2b_verushash_03acba9066aad4fc(uintptr_t arg1, swig_type_5 arg2, swig_intgo arg3, uintptr_t arg4);
extern void _wrap_Verushash_verushash_v2b1_verushash_03acba9066aad4fc(uintptr_t arg1, swig_type_6 arg2, swig_intgo arg3, uintptr_t arg4);
extern void _wrap_Verushash_verushash_v2b2_verushash_03acba9066aad4fc(uintptr_t arg1, swig_type_7 arg2, uintptr_t arg3);
extern uintptr_t _wrap_new_Verushash_verushash_03acba9066aad4fc(void);
extern void _wrap_delete_Verushash_verushash_03acba9066aad4fc(uintptr_t arg1);
#undef intgo
*/
import "C"
import "unsafe"
import _ "runtime/cgo"
import "sync"
type _ unsafe.Pointer
var Swig_escape_always_false bool
var Swig_escape_val interface{}
type _swig_fnptr *byte
type _swig_memberptr *byte
type _ sync.Mutex
func Swig_free(arg1 uintptr) {
_swig_i_0 := arg1
C._wrap_Swig_free_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0))
}
func Swig_malloc(arg1 int) (_swig_ret uintptr) {
var swig_r uintptr
_swig_i_0 := arg1
swig_r = (uintptr)(C._wrap_Swig_malloc_verushash_03acba9066aad4fc(C.swig_intgo(_swig_i_0)))
return swig_r
}
func Cdata(arg1 uintptr, _swig_args ...interface{}) (_swig_ret []byte) {
var arg2 int
if len(_swig_args) > 0 {
arg2 = _swig_args[0].(int)
}
var swig_r uint64
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (uint64)(C._wrap_cdata_verushash_03acba9066aad4fc(C.swig_intgo(len(_swig_args)), C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1)))
var swig_r_1 []byte
{
type swigcdata struct {
size int
data uintptr
}
p := (*swigcdata)(unsafe.Pointer(uintptr(swig_r)))
if p == nil || p.data == 0 {
swig_r_1 = nil
} else {
b := make([]byte, p.size)
a := (*[0x7fffffff]byte)(unsafe.Pointer(p.data))[:p.size]
copy(b, a)
Swig_free(p.data)
Swig_free(uintptr(unsafe.Pointer(p)))
swig_r_1 = b
}
}
return swig_r_1
}
func Memmove(arg1 uintptr, arg2 string, arg3 int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
C._wrap_memmove_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), *(*C.swig_type_2)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
type SwigcptrVerushash uintptr
func (p SwigcptrVerushash) Swigcptr() uintptr {
return (uintptr)(p)
}
func (p SwigcptrVerushash) SwigIsVerushash() {
}
func (arg1 SwigcptrVerushash) SetInitialized(arg2 bool) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_Verushash_initialized_set_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), C._Bool(_swig_i_1))
}
func (arg1 SwigcptrVerushash) GetInitialized() (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_Verushash_initialized_get_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0)))
return swig_r
}
func (arg1 SwigcptrVerushash) Initialize() {
_swig_i_0 := arg1
C._wrap_Verushash_initialize_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0))
}
func (arg1 SwigcptrVerushash) Verushash(arg2 string, arg3 int, arg4 uintptr) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_Verushash_verushash_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), *(*C.swig_type_3)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2), C.uintptr_t(_swig_i_3))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (arg1 SwigcptrVerushash) Verushash_v2(arg2 string, arg3 int, arg4 uintptr) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_Verushash_verushash_v2_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), *(*C.swig_type_4)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2), C.uintptr_t(_swig_i_3))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (arg1 SwigcptrVerushash) Verushash_v2b(arg2 string, arg3 int, arg4 uintptr) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_Verushash_verushash_v2b_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), *(*C.swig_type_5)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2), C.uintptr_t(_swig_i_3))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (arg1 SwigcptrVerushash) Verushash_v2b1(arg2 string, arg3 int, arg4 uintptr) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_Verushash_verushash_v2b1_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), *(*C.swig_type_6)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2), C.uintptr_t(_swig_i_3))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (arg1 SwigcptrVerushash) Verushash_v2b2(arg2 string, arg3 uintptr) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
C._wrap_Verushash_verushash_v2b2_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0), *(*C.swig_type_7)(unsafe.Pointer(&_swig_i_1)), C.uintptr_t(_swig_i_2))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func NewVerushash() (_swig_ret Verushash) {
var swig_r Verushash
swig_r = (Verushash)(SwigcptrVerushash(C._wrap_new_Verushash_verushash_03acba9066aad4fc()))
return swig_r
}
func DeleteVerushash(arg1 Verushash) {
_swig_i_0 := arg1.Swigcptr()
C._wrap_delete_Verushash_verushash_03acba9066aad4fc(C.uintptr_t(_swig_i_0))
}
type Verushash interface {
Swigcptr() uintptr
SwigIsVerushash()
SetInitialized(arg2 bool)
GetInitialized() (_swig_ret bool)
Initialize()
Verushash(arg2 string, arg3 int, arg4 uintptr)
Verushash_v2(arg2 string, arg3 int, arg4 uintptr)
Verushash_v2b(arg2 string, arg3 int, arg4 uintptr)
Verushash_v2b1(arg2 string, arg3 int, arg4 uintptr)
Verushash_v2b2(arg2 string, arg3 uintptr)
}