{"id":19436531,"url":"https://github.com/beached/crypto_helpers","last_synced_at":"2026-06-10T22:31:35.939Z","repository":{"id":149955271,"uuid":"104005191","full_name":"beached/crypto_helpers","owner":"beached","description":"Crypto Helper Library","archived":false,"fork":false,"pushed_at":"2019-10-09T01:06:11.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-25T06:46:53.336Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/beached.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":"2017-09-19T00:16:25.000Z","updated_at":"2019-10-09T01:06:12.000Z","dependencies_parsed_at":"2023-05-05T06:20:11.919Z","dependency_job_id":null,"html_url":"https://github.com/beached/crypto_helpers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beached/crypto_helpers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fcrypto_helpers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fcrypto_helpers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fcrypto_helpers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fcrypto_helpers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beached","download_url":"https://codeload.github.com/beached/crypto_helpers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beached%2Fcrypto_helpers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34174148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10T15:11:40.219Z","updated_at":"2026-06-10T22:31:35.920Z","avatar_url":"https://github.com/beached.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Crypto Helpers\n\n## SHA256 - in constexpr\n\n# literals\n\"\"_sha256 Creates a sha256_hash_string(struct that is implicitly convertable to a c_str) at compile time\n\"\"_sha256_digest Creates a SHA256 digest at compile time \n\"\"_sha256str Creates a std::string of the SHA256 hash\n\n# Literal Examples\n``` C++\nusing daw::crypto_literals;\nauto hash = \"Hello Word\"_sha256\nstd::cout \u003c\u003c hash \u003c\u003c '\\n';\n```\nWould output\n```\na591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e\n```\n\n# Function calls\nThe sha256_bin( some string like thing ) genrate a sha256 digest which contains the binary hash\n``` C++\ntemplate\u003ctypename CharT, typename Traits, typename IntSizeType, typename = std::enable_if_t\u003csizeof( CharT ) == 1\u003e\u003e\nconstexpr sha256_digest_t sha256_bin( daw::basic_string_view\u003cCharT, Traits, IntSizeType\u003e sv ) noexcept;\n\ntemplate\u003ctypename CharT, typename = std::enable_if_t\u003csizeof( CharT ) == 1\u003e\u003e\nconstexpr sha256_digest_t sha256_bin( CharT const *str, size_t len ) noexcept;\n\ntemplate\u003ctypename CharT, size_t N, typename = std::enable_if_t\u003csizeof( CharT ) == 1\u003e\u003e\nconstexpr sha256_digest_t sha256_bin( CharT const ( \u0026str )[N] ) noexcept;\n```\n\nThe sha256( some string like thing ) creates a sha256_hash_string which is implicitly converable to a c_str.  sha256str will create std::string but lacks constexpr\n\n``` C++\ntemplate\u003ctypename CharT, typename Traits, typename IntSizeType, typename = std::enable_if_t\u003csizeof( CharT ) == 1\u003e\u003e\nconstexpr sha256_hash_string sha256( daw::basic_string_view\u003cchar, Traits, IntSizeType\u003e sv ) noexcept;\n\ntemplate\u003ctypename CharT, typename = std::enable_if_t\u003csizeof( CharT ) == 1\u003e\u003e\nconstexpr sha256_hash_string sha256( CharT const *str, size_t len ) noexcept;\n\ntemplate\u003ctypename CharT, size_t N, typename = std::enable_if_t\u003csizeof( CharT ) == 1\u003e\u003e\nconstexpr sha256_hash_string sha256( CharT const ( \u0026str )[N] ) noexcept;\n\ntemplate\u003ctypename...Args\u003e\ninline std::string sha256str( Args\u0026\u0026... args ) noexcept;\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Fcrypto_helpers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeached%2Fcrypto_helpers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeached%2Fcrypto_helpers/lists"}