Skip to content

Commit

Permalink
fix log message
Browse files Browse the repository at this point in the history
  • Loading branch information
vernedeng committed Jan 6, 2025
1 parent 6a3f450 commit 1db6f5b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ private InlongSdkDirtyOptions getOptions(ReadableConfig config) {
.build();
}

private String decrypt(String before, String key) {
private String decrypt(String encrypted, String key) {
String decrypted = null;

try {
byte[] bytes = AESUtils.parseHexStr2Byte(before);
byte[] bytes = AESUtils.parseHexStr2Byte(encrypted);
bytes = AESUtils.decrypt(bytes, key.trim().getBytes(StandardCharsets.UTF_8));
decrypted = new String(Base64.decodeBase64(bytes), StandardCharsets.UTF_8);
} catch (Throwable t) {
log.warn("failed to decrypt {} into cmk", before, t);
log.warn("failed to decrypt {} with key {}", encrypted, key, t);
throw new RuntimeException(t);
}
return decrypted;
Expand Down

0 comments on commit 1db6f5b

Please sign in to comment.