{"id":21832958,"url":"https://github.com/null-none/go-scrypt","last_synced_at":"2025-03-21T13:44:37.067Z","repository":{"id":172058548,"uuid":"648794242","full_name":"null-none/go-scrypt","owner":"null-none","description":"Encrypt data with password","archived":false,"fork":false,"pushed_at":"2023-06-02T20:43:34.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T09:28:27.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/null-none.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-02T20:41:11.000Z","updated_at":"2023-06-02T20:42:32.000Z","dependencies_parsed_at":"2023-07-03T16:45:20.056Z","dependency_job_id":null,"html_url":"https://github.com/null-none/go-scrypt","commit_stats":null,"previous_names":["null-none/go-scrypt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fgo-scrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fgo-scrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fgo-scrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fgo-scrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/null-none","download_url":"https://codeload.github.com/null-none/go-scrypt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244807339,"owners_count":20513617,"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":[],"created_at":"2024-11-27T19:27:19.241Z","updated_at":"2025-03-21T13:44:37.037Z","avatar_url":"https://github.com/null-none.png","language":"Go","readme":"# go-scrypt\nEncrypt data with password\n\n```bash\ngo get -u golang.org/x/crypto\ngo get -u https://github.com/null-none/go-scrypt\n```\n\n```go\npackage main\n\nimport (\n\tScrypt \"github.com/null-none/go-scrypt\"\n\t\"bufio\"\n\t\"crypto/aes\"\n\t\"crypto/cipher\"\n\t\"crypto/rand\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"golang.org/x/crypto/scrypt\"\n\t\"log\"\n\t\"os\"\n\t\"strings\"\n)\n\n\nfunc main() {\n\treader := bufio.NewReader(os.Stdin)\n\tfmt.Println(\"Enter password and text for encryption\")\n\tfmt.Println(\"---------------------\")\n\tfmt.Print(\"Password -\u003e \")\n\tinputPassword, _ := reader.ReadString('\\n')\n\tinputPassword = strings.Replace(inputPassword, \"\\n\", \"\", -1)\n\tfmt.Print(\"Data -\u003e \")\n\tinputData, _ := reader.ReadString('\\n')\n\tinputData = strings.Replace(inputData, \"\\n\", \"\", -1)\n\n\tvar (\n\t\tpassword = []byte(inputPassword)\n\t\tdata     = []byte(inputData)\n\t)\n\tciphertext, err := Scrypt.Encrypt(password, data)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"ciphertext: %s\\n\", hex.EncodeToString(ciphertext))\n\tplaintext, err := Scrypt.Decrypt(password, ciphertext)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Printf(\"plaintext: %s\\n\", plaintext)\n  \n}\n```\n\n\n```bash\nEnter password and text for encryption\n---------------------\nPassword -\u003e test\nData -\u003e test\nciphertext: bc73454392d981a41fc3e36e8c9d547028ed02524bcfb7f112c683a8ac649786f56ffa591e0527a74d679b841d3e625f96541dc170a245c5df4818233e3f3d22\nplaintext: test\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull-none%2Fgo-scrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnull-none%2Fgo-scrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull-none%2Fgo-scrypt/lists"}