MCPcopy Create free account

hub / github.com/hako/branca / functions

Functions16 in github.com/hako/branca

↓ 9 callersFunctionNewBranca
NewBranca creates a *Branca struct.
branca.go:66
↓ 7 callersMethodDecodeToString
DecodeToString decodes the data.
branca.go:119
↓ 5 callersMethodEncodeToString
EncodeToString encodes the data matching the format: Version (byte) || Timestamp ([4]byte) || Nonce ([24]byte) || Ciphertext ([]byte) || Tag ([16]byte
branca.go:74
↓ 2 callersMethodSetTTL
SetTTL sets a Time To Live on the token for valid tokens.
branca.go:51
↓ 2 callersMethodsetNonce
setNonce sets a nonce for testing.
branca.go:61
↓ 2 callersMethodsetTimeStamp
setTimeStamp sets a timestamp for testing.
branca.go:56
MethodError
()
branca.go:37
FunctionTestBadKeyLengthError
TestBadKeyLengthError tests if (en/de)coding a token with an invalid key returns the corresponding error type.
branca_test.go:221
FunctionTestExpiredTokenError
TestExpiredTokenError tests if decoding an expired tokens returns the corresponding error type.
branca_test.go:177
FunctionTestGenerateToken
TestGenerateToken for testing issuing branca tokens.
branca_test.go:95
FunctionTestInvalidDecodeString
TestInvalidDecodeString for testing errors when decoding branca tokens.
branca_test.go:148
FunctionTestInvalidEncodeString
TestInvalidEncodeString for testing errors when generating branca tokens.
branca_test.go:122
FunctionTestInvalidTokenError
TestInvalidTokenError tests if decoding an invalid token returns the corresponding error type.
branca_test.go:198
FunctionTestInvalidTokenVersionError
TestInvalidTokenVersionError tests if decoding an invalid token returns the corresponding error type.
branca_test.go:208
FunctionTestVector1
TestVector1 for testing encoding data to a valid branca token.
branca_test.go:20
FunctionTestVector2
TestVector2 for testing encoding data to a valid branca token with a TTL.
branca_test.go:57