Skip to content

Conversation

@seanyeh
Copy link
Contributor

@seanyeh seanyeh commented Nov 5, 2025

Expose EncryptPlaintext to consumers of esc

@seanyeh seanyeh added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Nov 6, 2025
@seanyeh seanyeh marked this pull request as ready for review November 6, 2025 18:36
@seanyeh seanyeh changed the title Expose encrypt plaintext Expose EncryptPlaintext method Nov 7, 2025
})
}

func EncryptPlaintext(ctx context.Context, encrypter Encrypter, plaintext []byte) ([]byte, error) {
Copy link
Member

Choose a reason for hiding this comment

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

let's call this EncryptSecret for congruence with DecryptSecrets.

Suggested change
func EncryptPlaintext(ctx context.Context, encrypter Encrypter, plaintext []byte) ([]byte, error) {
func EncryptSecret(ctx context.Context, encrypter Encrypter, plaintext []byte) ([]byte, error) {

This also needs a doc comment. A simple test would be great as well--making sure it round-trips should be sufficient.

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

Labels

impact/no-changelog-required This issue doesn't require a CHANGELOG update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants