Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simukti/totp
Implementation of RFC-6238 (Time-Based One-Time Password Algorithm) in Go.
https://github.com/simukti/totp
go golang otp rfc-6238 totp
Last synced: 7 days ago
JSON representation
Implementation of RFC-6238 (Time-Based One-Time Password Algorithm) in Go.
- Host: GitHub
- URL: https://github.com/simukti/totp
- Owner: simukti
- License: mit
- Created: 2022-01-16T10:20:45.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-17T15:32:58.000Z (almost 3 years ago)
- Last Synced: 2024-10-30T04:59:48.884Z (about 2 months ago)
- Topics: go, golang, otp, rfc-6238, totp
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# TOTP
[![Coverage Status](https://coveralls.io/repos/github/simukti/totp/badge.svg?branch=main)](https://coveralls.io/github/simukti/totp?branch=main) [![Go Report Card](https://goreportcard.com/badge/github.com/simukti/totp)](https://goreportcard.com/report/github.com/simukti/totp) [![Sonar Violations (long format)](https://img.shields.io/sonar/violations/simukti_totp?server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/dashboard?id=simukti_totp) [![Sonar Tech Debt](https://img.shields.io/sonar/tech_debt/simukti_totp?server=https%3A%2F%2Fsonarcloud.io)](https://sonarcloud.io/dashboard?id=simukti_totp) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=simukti_totp&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=simukti_totp) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=simukti_totp&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=simukti_totp) [![License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/simukti/totp/main/LICENSE.txt)
[TOTP (RFC-6238)](https://datatracker.ietf.org/doc/html/rfc6238) implementation in [Go](https://go.dev/) with no external dependencies.
## INSTALL
You can do [little copying](https://go-proverbs.github.io/) the [`totp.go`](./totp.go) file or add this package as Go module dependency as follows (_version pinning is highly encouraged_):
```bash
go get -u -v github.com/simukti/totp
```## USAGE
See [totp_test.go](./totp_test.go).
## NOTES
- Shared-secret (`key`) parameter is in `[]byte` and will be used as-is, the implementor should handle its encoding/decoding as needed.
- It will only provide the code at the given time period counter only, no time skew mechanism.
- See [Security Considerations](https://datatracker.ietf.org/doc/html/rfc6238#section-5) in the official RFC.## LICENSE
[MIT](./LICENSE.txt)