aboutsummaryrefslogtreecommitdiff
path: root/lib/paseto/paseto_test.go
AgeCommit message (Collapse)Author
2026-03-28lib/paseto: move implementation to sub directory "v2"Shulhan
There are new versions of paseto standard: version 3 and version 4. To minimize conflicts in the future, we move the old implementation of paseto v2 to sub directory "v2" with package name "pasetov2". The paseto package now left with common functions, like creating pre-authentication encoding (PAE).
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2024-03-02all: move the repository to "git.sr.ht/~shulhan/pakakeh.go"Shulhan
There are several reasons that why we move from github.com. First, related to the name of package. We accidentally name the package with "share" a common word in English that does not reflect the content of repository. By moving to other repository, we can rename it to better and unique name, in this "pakakeh.go". Pakakeh is Minang word for tools, and ".go" suffix indicate that the repository related to Go programming language. Second, supporting open source. The new repository is hosted under sourcehut.org, the founder is known to support open source, and all their services are licensed under AGPL, unlike GitHub that are closed sources. Third, regarding GitHub CoPilot. The GitHub Terms of Service [1], allow any public content that are hosted there granted them to parse the content. On one side, GitHub helps and flourish the open source, but on another side have an issues regarding scraping the copyleft license [2]. [1]: https://docs.github.com/en/site-policy/github-terms/github-terms-of-service#4-license-grant-to-us [2]: https://githubcopilotinvestigation.com
2023-09-11lib/paseto: realign struct for better size allocationShulhan
The realignment reduce the cost of the following struct, * JSONFooter: from 24 to 16 bytes (-8) * Key: from 72 to 56 bytes (-16) * keys: from 16 to 8 bytes (-8) * struct in TestEncrypt: from 88 to 80 bytes (-8) * structtest in TestSign: from 72 to 64 bytes (-8) * PublicMode: from 80 to 64 bytes (-16) * struct in TestPublicMode_UnpackHTTPRequest: from 56 to 48 bytes (-8) * PublicToken: from 152 to 136 bytes (-16)
2021-04-22paseto: replace le64() function with binary.Write()Shulhan
The le64() return the string representation of uint64 in little endian, which is basically binary.Write with parameter output buffer, LittleEndian, and input value.
2021-03-14all: refactoring the test.Assert and test.AssertBench signatureShulhan
Previously, the test.Assert and test.AssertBench functions has the boolean parameter to print the stack trace of test in case its not equal. Since this parameter is not mandatory and its usually always set to "true", we remove them from function signature to simplify the call to Assert and AssertBench.
2020-09-09paseto: new package for working with pasetoShulhan
Package paseto provide the opionated implementation of Platform-Agnostic SEcurity TOkens (PASETOs) as defined in draft of RFC 01 [1]. This implementation only support PASETO Protocol v2. This library focus on how to sign and verify data, everything else is handled and filled automatically. [1] https://github.com/paragonie/paseto/blob/master/docs/RFC/draft-paragon-paseto-rfc-01.txt