Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

cipher: add CipherBase64 and CipherHex types - #18

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
samuelBarreto:feature/1410-support-base64-hex-encryption-keys
Apr 20, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
samuelBarreto:feature/1410-support-base64-hex-encryption-keys

Conversation

@samuelBarreto

Copy link
Copy Markdown
Contributor

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

@linux-foundation-easycla

linux-foundation-easycla Bot commented Apr 19, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: samuelBarreto / name: Samuel Andrade (c29301c)

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]>

@taylorsilva taylorsilva left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - TY!

@taylorsilva
taylorsilva merged commit 070c9bb into concourse:master Apr 20, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants