Documentation
¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func Contains(a string, values []string) bool
- func DecryptAESGCM(ciphertext, key []byte) ([]byte, error)
- func DecryptAESGCMFromString(ciphertextB64 string, key []byte) ([]byte, error)
- func DownloadGeoIpDatabase() error
- func EncryptAESGCM(plaintext, key []byte) ([]byte, error)
- func EncryptAESGCMToString(plaintext, key []byte) (string, error)
- func GetCountryShort(ip string) string
- func GetJoinCode(unitId string) string
- func HashPassword(password string) string
- func InitGeoIP() error
- func ListIPs(ipArg string, netmaskArg string) ([]string, error)
- func Remove(a string, values []string) []string
- func ToCIDR(ipStr, maskStr string) string
- func ToIpMask(cidr string) (string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func DecryptAESGCM ¶
DecryptAESGCM decrypts ciphertext using AES-GCM with the provided key.
func DecryptAESGCMFromString ¶
DecryptAESGCMFromString decodes base64 string and decrypts using AES-GCM.
func DownloadGeoIpDatabase ¶
func DownloadGeoIpDatabase() error
func EncryptAESGCM ¶
EncryptAESGCM encrypts plaintext using AES-GCM with the provided key.
func EncryptAESGCMToString ¶
EncryptAESGCMToString encrypts plaintext and returns a base64 string for DB storage.
func GetCountryShort ¶
func GetJoinCode ¶
generate join code the join code is a JSON encoded in base64 with the following fields: - unit_id - registration token - fqdn
func HashPassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.