Documentation ¶
Index ¶
- func B2S(b []byte) string
- func BytesBuilder(ptr *byte, len uint32) (buf []byte)
- func CreateCancelID() (windows.GUID, error)
- func CreateChallenge(len int) (string, error)
- func GetConsoleWindow() (hWnd uintptr)
- func GetForegroundWindow() (hWnd uintptr)
- func GetHostWindow() (hWnd uintptr)
- func S2B(s string) (b []byte)
- func UTF16PtrtoString(p *uint16) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesBuilder ¶
BytesBuilder converts PBYTE to go []byte.
func CreateCancelID ¶
CreateCancelID returns a new windows guid
func CreateChallenge ¶
CreateChallenge generates a new chanllenge that will be sent to the authenticator.
In order to prevent replay attacks, the challenges MUST contain enough entropy to make guessing them infeasible. Challenges SHOULD therefore be at least 16 bytes long. See https://w3c.github.io/webauthn/#sctn-cryptographic-challenges
Default 32 bytes length will be used if the given length is less than 16 or more than 256 ¶
Challenge is encoded in base64.
func GetConsoleWindow ¶
func GetConsoleWindow() (hWnd uintptr)
GetConsoleWindow retrieves the window handle used by the console associated with the calling process.
func GetForegroundWindow ¶
func GetForegroundWindow() (hWnd uintptr)
func GetHostWindow ¶
func GetHostWindow() (hWnd uintptr)
GetHostWindow retrieves the window handle used by the foreground window who starts the caliing process.
func UTF16PtrtoString ¶
UTF16PtrtoString converts a pointer to a UTF16 string into a Go string.
Types ¶
This section is empty.