Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/hako/branca
/ functions
Functions
16 in github.com/hako/branca
⨍
Functions
16
◇
Types & classes
2
↓ 9 callers
Function
NewBranca
NewBranca creates a *Branca struct.
branca.go:66
↓ 7 callers
Method
DecodeToString
DecodeToString decodes the data.
branca.go:119
↓ 5 callers
Method
EncodeToString
EncodeToString encodes the data matching the format: Version (byte) || Timestamp ([4]byte) || Nonce ([24]byte) || Ciphertext ([]byte) || Tag ([16]byte
branca.go:74
↓ 2 callers
Method
SetTTL
SetTTL sets a Time To Live on the token for valid tokens.
branca.go:51
↓ 2 callers
Method
setNonce
setNonce sets a nonce for testing.
branca.go:61
↓ 2 callers
Method
setTimeStamp
setTimeStamp sets a timestamp for testing.
branca.go:56
Method
Error
()
branca.go:37
Function
TestBadKeyLengthError
TestBadKeyLengthError tests if (en/de)coding a token with an invalid key returns the corresponding error type.
branca_test.go:221
Function
TestExpiredTokenError
TestExpiredTokenError tests if decoding an expired tokens returns the corresponding error type.
branca_test.go:177
Function
TestGenerateToken
TestGenerateToken for testing issuing branca tokens.
branca_test.go:95
Function
TestInvalidDecodeString
TestInvalidDecodeString for testing errors when decoding branca tokens.
branca_test.go:148
Function
TestInvalidEncodeString
TestInvalidEncodeString for testing errors when generating branca tokens.
branca_test.go:122
Function
TestInvalidTokenError
TestInvalidTokenError tests if decoding an invalid token returns the corresponding error type.
branca_test.go:198
Function
TestInvalidTokenVersionError
TestInvalidTokenVersionError tests if decoding an invalid token returns the corresponding error type.
branca_test.go:208
Function
TestVector1
TestVector1 for testing encoding data to a valid branca token.
branca_test.go:20
Function
TestVector2
TestVector2 for testing encoding data to a valid branca token with a TTL.
branca_test.go:57