GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: add a test for offset against BlockEncryptionHandler by kessplas · Pull Request #2115 · aws/aws-encryption-sdk-java

Conversation

@kessplas

@kessplas kessplas commented May 29, 2025

Copy link
Copy Markdown
Contributor

Issue #, if available: #2112 (indirectly)

Description of changes: See above issue. This PR just adds a similar test to the BlockEncryptionHandler to ensure it doesn't have the same bug. It doesn't, but we'll include the test for robustness's sake.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kessplas and others added 3 commits May 29, 2025 10:10
@kessplas
chore: add a test for offset against BlockEncryptionHandler
afa3a5b
@kessplas
format
698bfb4
@kessplas
Merge branch 'master' into offset-block
53d9bd7
@kessplas
kessplas marked this pull request as ready for review May 29, 2025 18:07
@kessplas
kessplas requested a review from a team as a code owner May 29, 2025 18:07
lucasmcdonald3
lucasmcdonald3 approved these changes May 29, 2025
View reviewed changes
Comment thread src/test/java/com/amazonaws/encryptionsdk/internal/BlockEncryptionHandlerTest.java
dataLength);
// decryptData (non-streaming) doesn't know about the offset
// it will strip out the original 0s
byte[] expectedOutput = new byte[10_000 - startOffset];

@lucasmcdonald3 lucasmcdonald3 May 29, 2025

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

nit for clarity, maybe

Suggested change
byte[] expectedOutput = new byte[10_000 - startOffset];
byte[] expectedOutputForNonStreamDecrypt = new byte[10_000 - startOffset];

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kessplas
kessplas merged commit 08cf1a3 into master May 29, 2025
@kessplas
kessplas deleted the offset-block branch May 29, 2025 20:03
josecorella pushed a commit that referenced this pull request Jun 4, 2025
@semantic-release-bot
AWS Encryption SDK 3.0.2 Release -- 2025-06-04
3b1699d
## [3.0.2](v3.0.1...v3.0.2) (2025-06-04)

### Fixes

* **AwsCrypto:** remove pre-mature Deprecation notices ([#2118](#2118)) ([4a19b04](4a19b04))
* do not truncate encrypted streams when offset is greater than zero ([#2113](#2113)) ([adb0a42](adb0a42))
* guard against null version and change property name to avoid conflicts ([#2116](#2116)) ([313caa7](313caa7))

### Maintenance

* add a test for offset against BlockEncryptionHandler ([#2115](#2115)) ([08cf1a3](08cf1a3))
* bump to latest mpl ([#2046](#2046)) ([6dd2d12](6dd2d12))
* **cfn:** Sonatype Migration to User Tokens; updated policies for CI project ([#2043](#2043)) ([7cfe049](7cfe049))
* **deps-dev:** bump commons-io:commons-io from 2.11.0 to 2.14.0 ([#2047](#2047)) ([1695a39](1695a39))
* **examples:** Shared cache across Hierarchical Keyrings ([#2045](#2045)) ([fd00cd0](fd00cd0))
* fix semantic release installation ([#2119](#2119)) ([0586279](0586279))
* **JavaDocs:** detail thread saftey of SDK Client Builders ([#2048](#2048)) ([86d5b62](86d5b62))
* move release to Nexus Central ([#2117](#2117)) ([9e91dad](9e91dad))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lucasmcdonald3 lucasmcdonald3 lucasmcdonald3 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@kessplas @lucasmcdonald3
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.