Skip to content

add iconv-lite encode#8956

Merged
jackkav merged 5 commits into
Kong:developfrom
jackkav:add-encode-brdige-for-iconv-lite
Aug 14, 2025
Merged

add iconv-lite encode#8956
jackkav merged 5 commits into
Kong:developfrom
jackkav:add-encode-brdige-for-iconv-lite

Conversation

@jackkav

@jackkav jackkav commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

extend bridge to include encoding in order to continue support for md5 hash output

closes INS-1061

if (encoding !== 'hex' && encoding !== 'latin1' && encoding !== 'base64') {
async run(context, algorithm: 'md5' | 'sha1' | 'sha256' | 'sha512', encoding: 'hex' | 'base64', value = '') {
if (encoding !== 'hex' && encoding !== 'base64') {
throw new Error(`Invalid encoding ${encoding}. Choices are hex, latin1, base64`);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Since we do not provide latin1 encoding, we should remove this in error message

cwangsmv
cwangsmv previously approved these changes Aug 14, 2025

@cwangsmv cwangsmv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

cwangsmv
cwangsmv previously approved these changes Aug 14, 2025
@cwangsmv

Copy link
Copy Markdown
Contributor

Update the md5 tag smoke test to compare with MD5 output value

@jackkav jackkav force-pushed the add-encode-brdige-for-iconv-lite branch from dad8098 to 6029c8e Compare August 14, 2025 08:25
@jackkav jackkav enabled auto-merge (squash) August 14, 2025 08:25
@jackkav jackkav force-pushed the add-encode-brdige-for-iconv-lite branch from 6029c8e to e27ae91 Compare August 14, 2025 10:46
@jackkav jackkav disabled auto-merge August 14, 2025 10:46
@jackkav jackkav merged commit 782118a into Kong:develop Aug 14, 2025
9 checks passed
@jackkav jackkav deleted the add-encode-brdige-for-iconv-lite branch August 14, 2025 10:46
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