Package yubikey provides Go bindings for libyubikey.
const ( // BLOCKSIZE as defined in libyubikey/yubikey.h:44 BLOCKSIZE = 16 // KEYSIZE as defined in libyubikey/yubikey.h:45 KEYSIZE = 16 // UIDSIZE as defined in libyubikey/yubikey.h:46 UIDSIZE = 6 // OTPSIZE as defined in libyubikey/yubikey.h:47 OTPSIZE = (2 * BLOCKSIZE) // MODHEXMAP as defined in libyubikey/yubikey.h:94 MODHEXMAP = "cbdefghijklnrtuv" // CRCOKRESIDUE as defined in libyubikey/yubikey.h:122 CRCOKRESIDUE = 0xf0b8 )
AesDecrypt function as declared in libyubikey/yubikey.h:129
AesEncrypt function as declared in libyubikey/yubikey.h:130
Crc16 function as declared in libyubikey/yubikey.h:123
Generate function as declared in libyubikey/yubikey.h:81
HexDecode function as declared in libyubikey/yubikey.h:111
HexEncode function as declared in libyubikey/yubikey.h:110
HexP function as declared in libyubikey/yubikey.h:116
ModhexDecode function as declared in libyubikey/yubikey.h:106
ModhexEncode function as declared in libyubikey/yubikey.h:100
ModhexP function as declared in libyubikey/yubikey.h:115
Parse function as declared in libyubikey/yubikey.h:76
Token as declared in libyubikey/yubikey.h:68
NewTokenRef creates a new wrapper struct with underlying reference set to the original C object. Returns nil if the provided pointer to C object is nil too.
Deref uses the underlying reference to C object and fills the wrapping struct with values. Do not forget to call this method whether you get a struct for C object and want to read its values.
Free invokes alloc map's free mechanism that cleanups any allocated memory using C free. Does nothing if struct is nil or has no allocation map.
PassRef returns the underlying C object, otherwise it will allocate one and set its values from this wrapping struct, counting allocations into an allocation map.
PassValue does the same as PassRef except that it will try to dereference the returned pointer.
Ref returns the underlying reference to C object or nil if struct is nil.