{"id":13413766,"url":"https://github.com/raja/argon2pw","last_synced_at":"2025-03-14T19:33:15.078Z","repository":{"id":40477334,"uuid":"125059824","full_name":"raja/argon2pw","owner":"raja","description":"Argon2 password hashing package for go with constant time hash comparison","archived":false,"fork":false,"pushed_at":"2021-09-10T18:37:55.000Z","size":23,"stargazers_count":89,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-31T20:52:50.064Z","etag":null,"topics":["argon2","cryptography","go","golang","passwords"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-13T13:56:36.000Z","updated_at":"2024-04-27T03:54:22.000Z","dependencies_parsed_at":"2022-09-02T12:01:22.113Z","dependency_job_id":null,"html_url":"https://github.com/raja/argon2pw","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raja%2Fargon2pw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raja%2Fargon2pw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raja%2Fargon2pw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raja%2Fargon2pw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raja","download_url":"https://codeload.github.com/raja/argon2pw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243635855,"owners_count":20323007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argon2","cryptography","go","golang","passwords"],"created_at":"2024-07-30T20:01:48.636Z","updated_at":"2025-03-14T19:33:14.682Z","avatar_url":"https://github.com/raja.png","language":"Go","readme":"# argon2pw\n[![GoDoc](https://godoc.org/github.com/raja/argon2pw?status.svg)](https://godoc.org/github.com/raja/argon2pw)\n[![Build Status](https://travis-ci.org/raja/argon2pw.svg?branch=master)](https://travis-ci.org/raja/argon2pw)\n[![Go Report Card](https://goreportcard.com/badge/github.com/raja/argon2pw)](https://goreportcard.com/report/github.com/raja/argon2pw)\n\nArgon2 password hashing package with constant time hash comparison\n\n**Preface:**\nArgon2 was selected as the winner of the [Password Hashing Competition](https://password-hashing.net/). Argon2 is ideal for deriving cryptographic keys from passwords.\n\nThis package utilizes the Argon2i hashing algorithm that is the side-channel resistant version of Argon2. It uses data-independent memory access, which is preferred for password hashing and password-based key derivation. Argon2i requires more passes over memory than Argon2id to protect from trade-off attacks.\n\nThe generated salted hash is ideal for persistent storage in a single column as a string and is future proof if time or memory parameters for argon2i change.\n\nAdditionally, argon2pw includes a function for password comparison in constant time to prevent [timing attack](https://en.wikipedia.org/wiki/Timing_attack) vectors.\n\n**Usage:**\n```go\npackage main\nimport \"github.com/raja/argon2pw\"\n\n func main() {\n\t // Generate a hashed password\n\t testPassword := `testPassword$x1w432b7^`\n\t hashedPassword, err := argon2pw.GenerateSaltedHash(testPassword)\n\t if err != nil {\n         log.Panicf(\"Hash generated returned error: %v\", err)\n\t }\n\n\t // Test correct password in constant time\n\t valid, err := argon2pw.CompareHashWithPassword(hashedPassword, testPassword)\n\t log.Printf(\"The password validity is %t against the hash\", valid)\n\n\t // Test incorrect password in constant time\n\t valid, err = argon2pw.CompareHashWithPassword(hashedPassword, \"badPass\")\n\t log.Printf(\"The password validity is %t against the hash\", valid)\n }\n\n```\n","funding_links":[],"categories":["Security","安全","安全领域相关库","Relational Databases","安全性"],"sub_categories":["HTTP Clients","Advanced Console UIs","查询语","HTTP客户端","交流"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraja%2Fargon2pw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraja%2Fargon2pw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraja%2Fargon2pw/lists"}