Documentation ¶
Index ¶
Constants ¶
View Source
const AutoKeyMaxLength int = 11
AutoKeyMaxLength auto generated key max length
View Source
const UserKeyMaxLength int = 10
UserKeyMaxLength User input key max length
Variables ¶
This section is empty.
Functions ¶
func GenerateUserKey ¶
GenerateUserKey if user input password is less than UserKeyMaxlength
func RandomKeyGen ¶
RandomKeyGen generate random hex string of any given length
Types ¶
type Payload ¶
type Payload struct { /* tag_operation: either "insert" (Encrypt data) or "get" (Decrypt) user_key: user password maximum of 11 characters tag_key: token data stored in NFC tag, if get operation is performed else empty string data: Encrypted data, if get operation is performed else empty string */ TagOperation string `json:"tag_operation"` UserKey string `json:"user_key"` TagKey string `json:"tag_key"` Data string `json:"data"` }
Payload struct stores data exchanged b/w flutter and Go
Click to show internal directories.
Click to hide internal directories.