{"id":28237241,"url":"https://github.com/just-do-halee/secwords","last_synced_at":"2025-06-10T15:30:35.707Z","repository":{"id":57666525,"uuid":"401635360","full_name":"just-do-halee/secwords","owner":"just-do-halee","description":"secure and safe password container.","archived":false,"fork":false,"pushed_at":"2021-09-07T04:19:53.000Z","size":23,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T16:29:47.950Z","etag":null,"topics":["algorithms","container","cryptography","no-std","password","rust","security","temporary"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/just-do-halee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-31T08:52:20.000Z","updated_at":"2023-02-15T08:19:56.000Z","dependencies_parsed_at":"2022-09-26T20:31:46.262Z","dependency_job_id":null,"html_url":"https://github.com/just-do-halee/secwords","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just-do-halee%2Fsecwords","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just-do-halee%2Fsecwords/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just-do-halee%2Fsecwords/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just-do-halee%2Fsecwords/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/just-do-halee","download_url":"https://codeload.github.com/just-do-halee/secwords/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/just-do-halee%2Fsecwords/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259101011,"owners_count":22805188,"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":["algorithms","container","cryptography","no-std","password","rust","security","temporary"],"created_at":"2025-05-19T00:17:54.474Z","updated_at":"2025-06-10T15:30:35.687Z","avatar_url":"https://github.com/just-do-halee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Secwords`\n\n[![CI][ci-badge]][ci-url]\n[![Crates.io][crates-badge]][crates-url]\n[![Licensed][license-badge]][license-url]\n[![Twitter][twitter-badge]][twitter-url]\n\n[ci-badge]: https://github.com/just-do-halee/secwords/actions/workflows/ci.yml/badge.svg\n[crates-badge]: https://img.shields.io/crates/v/secwords.svg?labelColor=383636\n[license-badge]: https://img.shields.io/crates/l/secwords?labelColor=383636\n[twitter-badge]: https://img.shields.io/twitter/follow/do_halee?style=flat\u0026logo=twitter\u0026color=4a4646\u0026labelColor=333131\u0026label=just-do-halee\n\n[ci-url]: https://github.com/just-do-halee/secwords/actions\n[twitter-url]: https://twitter.com/do_halee\n[crates-url]: https://crates.io/crates/secwords\n[license-url]: https://github.com/just-do-halee/secwords\n\nsecure and safe password container.\n\n* typed system\n* memory safety\n* unicode safety\n\u003cbr\u003e(no-std support)\n\n| [Docs](https://docs.rs/secwords) | [Latest Note](https://github.com/just-do-halee/secwords/blob/main/CHANGELOG.md) |\n\n\n```toml\n[dependencies]\nsecwords = \"2.1.1\"\n```\n\nor\n\n```toml\n[dependencies]\nsecwords = { version = \"2.1.1\", default-features = false } # no-std\n```\n\n---\n\n\n## `How to`\n```rust\nuse secwords::Password;\nuse sha2::Sha256; // can be any hasher of dyn Digest `digest` crate\n\nlet plain = String::from(\"pa5$wOrs\"); // \u003c- example\n\nlet pass1 = Password::\u003cSha256, 6\u003e::new(plain).unwrap(); // min length = 6\nlet pass2: Password\u003cSha256, 6\u003e = \"pa5$wOrs\".parse().unwrap();\n\nassert_eq!(pass1, pass2); // they are hashed, original is gone(safely)\nassert_eq!(pass1.len(), 32); // fixed size `vep`(crate)\nassert_eq!(pass1.as_ref(), pass2.as_slice());\nassert_eq!(pass1.to_vec(), pass2.to_vec());\n\nassert_eq!(pass1, \"pa5$wOrs\");\nassert_eq!(pass1, String::from(\"pa5$wOrs\"));\nassert_eq!(\u0026pass1.to_hex().unwrap()[..20], \"0f521249b366dd6e0acc\");\nassert_eq!(format!(\"{}\", pass1), \"***SECURE***\"); // display\nassert_eq!(format!(\"{:?}\", pass1), \"***SECURE***\"); // debug\n\nlet bytes = pass1.to_bytes(); // encode\nlet pass3 = Password::\u003cSha256, 6\u003e::from_bytes(bytes).unwrap(); // decode\nassert_eq!(pass1, pass3);\n\nlet hex_string = pass1.to_hex().unwrap(); // encode\nlet pass3 = Password::\u003cSha256, 6\u003e::from_hex(hex_string).unwrap(); // decode\nassert_eq!(pass1, pass3);\n```\nthere are more examples in the `lib.rs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjust-do-halee%2Fsecwords","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjust-do-halee%2Fsecwords","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjust-do-halee%2Fsecwords/lists"}