Skip to content

Commit

Permalink
NIFI-12094 This closes apache#7767. Removed EncryptContent and Crypto…
Browse files Browse the repository at this point in the history
…graphicHashAttribute

- Removed CipherProvider interface and implementations from nifi-security-utils

Signed-off-by: Joseph Witt <[email protected]>
  • Loading branch information
exceptionfactory authored and joewitt committed Sep 20, 2023
1 parent e5894cf commit 2602e16
Show file tree
Hide file tree
Showing 64 changed files with 5 additions and 11,484 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ MiNiFi is able to use the following processors out of the box:
* ControlRate
* ConvertCharacterSet
* DuplicateFlowFile
* EncryptContent
* EvaluateJsonPath
* EvaluateRegularExpression
* EvaluateXPath
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import java.nio.charset.StandardCharsets;
import java.security.SecureRandom;
import java.util.Base64;

public abstract class AbstractSecureHasher implements SecureHasher {
private static final Logger logger = LoggerFactory.getLogger(AbstractSecureHasher.class);
Expand Down Expand Up @@ -185,7 +186,7 @@ public String hashBase64(String input) {
return "";
}

return CipherUtility.encodeBase64NoPadding(hash(input.getBytes(StandardCharsets.UTF_8)));
return Base64.getEncoder().withoutPadding().encodeToString(hash(input.getBytes(StandardCharsets.UTF_8)));
}

/**
Expand All @@ -204,7 +205,7 @@ public String hashBase64(String input, String salt) {
return "";
}

return CipherUtility.encodeBase64NoPadding(hash(input.getBytes(StandardCharsets.UTF_8), salt.getBytes(StandardCharsets.UTF_8)));
return Base64.getEncoder().withoutPadding().encodeToString(hash(input.getBytes(StandardCharsets.UTF_8), salt.getBytes(StandardCharsets.UTF_8)));
}

/**
Expand Down
Loading

0 comments on commit 2602e16

Please sign in to comment.