Here goes nothing
This commit is contained in:
@@ -151,6 +151,14 @@ func getCode(configName string) *C.char {
|
||||
return cCode
|
||||
}
|
||||
|
||||
//export getCodeFromI
|
||||
func getCodeFromI(index int) *C.char {
|
||||
code := configs[index].TOTP()
|
||||
cCode := C.CString(code)
|
||||
runtime.KeepAlive(code)
|
||||
return cCode
|
||||
}
|
||||
|
||||
//export getTimeRemaining
|
||||
func getTimeRemaining(n int) uint64 {
|
||||
return uint64(n) - (uint64(time.Now().Unix()) % uint64(n))
|
||||
|
||||
Reference in New Issue
Block a user