Skip to content

Fix sha1 - #1373

Open
jpantonow wants to merge 2 commits into
QuantumBadger:masterfrom
jpantonow:fix/sha1-messagedigestspec-20260811031357-c567f468
Open

Fix sha1#1373
jpantonow wants to merge 2 commits into
QuantumBadger:masterfrom
jpantonow:fix/sha1-messagedigestspec-20260811031357-c567f468

Conversation

@jpantonow

Copy link
Copy Markdown

Analysis context

Property Value
Method sha1
Class org.quantumbadger.redreader.common.General
File src/main/java/org/quantumbadger/redreader/common/General.kt
Specification MessageDigestSpec
Analysis tool fastbot

Proposed change

Replacing SHA-1 with SHA-256 satisfies the verified MessageDigestSpec while preserving the existing method signature and digest(byte[]) usage. The resulting hexadecimal digest is distinct from the legacy SHA-1 value, so the confirmed derived cache filename becomes a cache miss and is regenerated through the existing cache fallback flow. The unqualified getInstance(String) call continues to allow the platform to select a supporting provider.

Compatibility note

This change updates an identifier used only for derived, regenerable cache entries. Existing entries created with the previous identifier may become cache misses and be regenerated. The change is not intended to invalidate user-owned source data, credentials, preferences, or offline-only data. Legacy cache files may remain until the project's normal cache cleanup.

Validation

  • Change limited to the related file
  • Manual review required
  • Confirmed by a project maintainer

Additional context

I’m an undergraduate Computer Engineering student at the University of Brasília (UnB), and this contribution is part of a research project involving software security analysis.

I’m happy to adjust the implementation to better match the project’s architecture, coding conventions, or maintainers’ recommendations.

Repository guidance

This contribution was prepared with reference to:

  • CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant