{"id":20601400,"url":"https://github.com/tmccarthy/digest4s","last_synced_at":"2026-06-01T04:31:39.511Z","repository":{"id":42183060,"uuid":"310975611","full_name":"tmccarthy/digest4s","owner":"tmccarthy","description":"Utilities for computing digests and using binary codecs in Scala","archived":false,"fork":false,"pushed_at":"2023-02-12T23:32:32.000Z","size":68,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-06T16:19:13.698Z","etag":null,"topics":["commons-codec","digest","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/tmccarthy.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":"2020-11-08T03:10:51.000Z","updated_at":"2024-12-09T19:54:15.000Z","dependencies_parsed_at":"2022-09-02T22:01:30.637Z","dependency_job_id":null,"html_url":"https://github.com/tmccarthy/digest4s","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tmccarthy/digest4s","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmccarthy%2Fdigest4s","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmccarthy%2Fdigest4s/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmccarthy%2Fdigest4s/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmccarthy%2Fdigest4s/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmccarthy","download_url":"https://codeload.github.com/tmccarthy/digest4s/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmccarthy%2Fdigest4s/sbom","scorecard":{"id":889766,"data":{"date":"2025-08-11","repo":{"name":"github.com/tmccarthy/digest4s","commit":"17d2a4d095a273f76e4cac11de24a5e98fd87e28"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/clean.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:154: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:161: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:170: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:177: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:186: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:193: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:200: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:212: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:222: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:232: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:242: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:95: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:130: update your workflow using https://app.stepsecurity.io/secureworkflow/tmccarthy/digest4s/ci.yml/main?enable=pin","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T11:20:40.499Z","repository_id":42183060,"created_at":"2025-08-24T11:20:40.499Z","updated_at":"2025-08-24T11:20:40.499Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33760645,"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-01T02:00:06.963Z","response_time":115,"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":["commons-codec","digest","scala"],"created_at":"2024-11-16T09:09:55.302Z","updated_at":"2026-06-01T04:31:39.495Z","avatar_url":"https://github.com/tmccarthy.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `digest4s`\n\n[![Maven Central](https://img.shields.io/maven-central/v/au.id.tmm.digest4s/digest4s-core_2.13.svg)](https://repo.maven.apache.org/maven2/au/id/tmm/digest4s/digest4s-core_2.13/)\n\nA set of utilities for generating digests and handling binary codecs in Scala. Built on top of [Apache Commons Codec](https://commons.apache.org/proper/commons-codec/).\n\n## Getting started\n\nAdd the following to your `build.sbt` file. The latest version of the library should be in the Maven badge above. \nOtherwise you can checkout [the artefact listing on `mvnrepository.com`](https://mvnrepository.com/artifact/au.id.tmm.digest4s/digest4s-core).\n\n```scala\nlibraryDependencies += \"au.id.tmm.digest4s\" %% \"digest4s-core\" % \"1.0.0\"\n```\n\nThe simplest way to use the library is with the syntax import:\n\n```scala\nimport au.id.tmm.digest4s.syntax._\n```\n\n## Binary codec utilities\n\n### Parsing bytes from encoded strings\n\n```scala\nimport au.id.tmm.digest4s.binarycodecs.syntax._\n\nimport org.apache.commons.codec.DecoderException\nimport scala.collection.immutable.ArraySeq\n\n// Parse binary encoded Strings safely\n\nval byteArray: Either[DecoderException, ArraySeq[Byte]] = \"VXQ2DXQ=\".parseBase32\nval byteArray: Either[DecoderException, ArraySeq[Byte]] = \"reGh3g==\".parseBase64\nval byteArray: Either[DecoderException, ArraySeq[Byte]] = \"11011110101000011110000110101101\".parseBinary\nval byteArray: Either[DecoderException, ArraySeq[Byte]] = \"ADE1A1DE\".parseHex\n\n// Parse unsafely, throw if encoding is invalid:\n\nval byteArray: ArraySeq[Byte] = \"VXQ2DXQ=\".parseBase32OrThrow\nval byteArray: ArraySeq[Byte] = \"reGh3g==\".parseBase64OrThrow\nval byteArray: ArraySeq[Byte] = \"11011110101000011110000110101101\".parseBinaryOrThrow\nval byteArray: ArraySeq[Byte] = \"ADE1A1DE\".parseHexOrThrow\n\n// Use StringContext (throws if invalid)\n\nval byteArray: ArraySeq[Byte] = base32\"VXQ2DXQ=\"\nval byteArray: ArraySeq[Byte] = base64\"reGh3g==\"\nval byteArray: ArraySeq[Byte] = binary\"11011110101000011110000110101101\"\nval byteArray: ArraySeq[Byte] = hex\"ADE1A1DE\"\n```\n\n### Encoding bytes into string representations\n\n```scala\nimport au.id.tmm.digest4s.binarycodecs.syntax._\n\nimport scala.collection.immutable.ArraySeq\n\n// Encode bytes to String\n\nval bytes: Array[Byte] = Array[Byte](0xad.toByte, 0xe1.toByte, 0xa1.toByte, 0xde.toByte)\n\nbytes.asBase32String // \"VXQ2DXQ=\"\nbytes.asBase64String // \"reGh3g==\"\nbytes.asBinaryString // \"11011110101000011110000110101101\"\nbytes.asHexString    // \"ADE1A1DE\"\n\n// Can be used for different collection types\n\nbytes.to(ArraySeq).asHexString // \"ADE1A1DE\"\nbytes.toVector.asHexString     // \"ADE1A1DE\"\nbytes.toList.asHexString       // \"ADE1A1DE\"\n```\n\n## Digest utilities\n\n### Digest value classes\n\nThere are a number of value classes in the `au.id.tmm.digest4s.digest` package which can improve the semantic clarity of\nchecksum fields:\n\n```scala\nimport au.id.tmm.digest4s.digest._\n\ncase class Document(\n  checksum: Array[Byte], // 🤷 Bad, not clear what the algorithm is\n)\n\ncase class Document(\n  checksum: MD5Digest,   // 😎 Clearer, describes the algorithm\n)\n```\n\n### Computing digests\n\n```scala\nimport java.io.IOException\n\nimport au.id.tmm.digest4s.digest._\nimport au.id.tmm.digest4s.digest.syntax._\n\n// Compute digests for safe types\n\nval md5Digest: MD5Digest       = \"Hello\".md5\nval sha256Digest: SHA256Digest = Array[Byte](0xad.toByte, 0xe1.toByte, 0xa1.toByte, 0xde.toByte).sha256\nval sha512Digest: SHA512Digest = List[Byte](0xad.toByte, 0xe1.toByte, 0xa1.toByte, 0xde.toByte).sha512\n\n// Compute digests for types where you might hit an IOException:\n\nval md5Digest: Either[IOException, MD5Digest] = java.nio.file.Paths.get(\"test\").md5OrError\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmccarthy%2Fdigest4s","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmccarthy%2Fdigest4s","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmccarthy%2Fdigest4s/lists"}