Skip to content

Commit

Permalink
Add getAlgorithm method to all PseudoFunc implementations.
Browse files Browse the repository at this point in the history
  • Loading branch information
Skaar, Bjørn-Andre committed Dec 11, 2023
1 parent 769ee1c commit 9506efe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/no/ssb/dapla/dlp/pseudo/func/fpe/FpeFunc.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ public class FpeFunc extends AbstractPseudoFunc {
private final FormatPreservingEncryption fpe;
private final FpeConfigService fpeConfigService = new FpeConfigService();

private static final String ALGORITHM = "FPE";

// We should consider implementing a more sophisticated tweak, see:
// https://crypto.stackexchange.com/questions/10903/what-are-the-uses-of-tweaks-in-block-ciphers
private static final byte[] STATIC_TWEAK = new byte[0];

@Override
public String getAlgorithm() {
return ALGORITHM;
}

public FpeFunc(PseudoFuncConfig genericConfig) {
super(genericConfig.getFuncDecl());
config = fpeConfigService.resolve(genericConfig);
Expand Down

0 comments on commit 9506efe

Please sign in to comment.