Skip to content

iOS: consolidate SHA-256 hashing into a shared utility - #47

Draft
ofalvai wants to merge 1 commit into
ios-bspatch-integrationfrom
ios-sha256-refactor
Draft

iOS: consolidate SHA-256 hashing into a shared utility#47
ofalvai wants to merge 1 commit into
ios-bspatch-integrationfrom
ios-sha256-refactor

Conversation

@ofalvai

@ofalvai ofalvai commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Split off from #48. We'll be doing more SHA-256 checksumming in additional codepaths, let's extract this to a common utility.

As a bonus, some existing callers, which loaded entire files into memory before hashing are now loading data in smaller chunks.

@ofalvai ofalvai changed the title ios sha256 refactor iOS: consolidate SHA-256 hashing into a shared utility Aug 27, 2026
@ofalvai
ofalvai requested a balanced review from Copilot August 28, 2026 14:18
@ofalvai
ofalvai force-pushed the ios-sha256-refactor branch from 0a49aa1 to d648e54 Compare August 28, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Consolidates iOS SHA-256 hashing into a reusable utility and reduces memory usage through chunked file reads.

Changes:

  • Adds shared data and file hashing functions.
  • Migrates update-manifest hashing to the utility.
  • Propagates file-hashing failures through existing error paths.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
ios/CodePush/CodePushUpdateUtils.m Uses shared hashing functions and handles failures.
ios/CodePush/CodePushSha256.m Implements SHA-256 hashing for data and streamed files.
ios/CodePush/CodePushSha256.h Declares the shared hashing interface.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -1,5 +1,5 @@
#import "CodePush.h"
#include <CommonCrypto/CommonDigest.h>
#import "CodePushSha256.h"
Comment thread ios/CodePush/CodePushSha256.m Outdated
@ofalvai
ofalvai force-pushed the ios-sha256-refactor branch from d648e54 to eb3db6c Compare August 28, 2026 14:44
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.

2 participants