This repository was archived by the owner on Apr 20, 2026. It is now read-only.
Repository navigation
cipher: add CipherBase64 and CipherHex types - #18
Merged
taylorsilva merged 1 commit intoApr 20, 2026
Merged
taylorsilva merged 1 commit into
taylorsilva merged 1 commit into
Conversation
|
|
Add support for base64-encoded and hex-encoded encryption keys, allowing users to supply keys with full byte range (0x00-0xFF) without being limited by printable ASCII characters. The existing Cipher type remains unchanged for backward compatibility. A shared unmarshalCipher function avoids code duplication. concourse/concourse#1410 Signed-off-by: root <[email protected]>
samuelBarreto
force-pushed
the
feature/1410-support-base64-hex-encryption-keys
branch
from
April 19, 2026 05:37
7ea4a5d to
c29301c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add CipherBase64 and CipherHex types
Adds two new flag types that parse encryption keys as base64 or hex-encoded strings, solving the entropy limitation described in concourse/concourse#1410.
CipherBase64 — decodes base64 before creating the AES cipher
CipherHex — decodes hex before creating the AES cipher
Existing Cipher type unchanged (backward compatible)
Shared unmarshalCipher helper to avoid duplication
Full test coverage including compatibility test