forked from fernet/fernet-go
Fernet generates and verifies HMAC-based authentication tokens.
License
msakrejda/fernet-1
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Fernet allows you to easily generate and verify HMAC-based authentication tokens for issuing API requests between remote servers. It also encrypts data, so it can be used to transmit secure messages over the wire. This package is compatible with the Ruby implementation at https://github.com/hgmnz/fernet. They can exchange tokens freely in both directions. See http://godoc.org/github.com/kr/fernet for documentation. INSTALL $ go get github.com/kr/fernet EXAMPLE var key = fernet.MustDecodeKey(os.Getenv("MYSECRET")) func main() { token := key.EncryptAndSign([]byte("foo")) // ... if data := key.VerifyAndDecrypt(token, time.Minute); data != nil { // ... } } For more information and background, see the original Fernet project at https://github.com/hgmnz/fernet. Fernet is distributed under the terms of the MIT license. See the License file for details.
About
Fernet generates and verifies HMAC-based authentication tokens.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Go 100.0%