From de393a88d9dc57881c0ccabb101636c24c32a550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skaar=2C=20Bj=C3=B8rn-Andre?= Date: Tue, 6 Feb 2024 23:24:20 +0100 Subject: [PATCH] Expose keyId reference in PseudoFuncDeclaration --- .../no/ssb/dlp/pseudo/core/func/PseudoFuncDeclaration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/no/ssb/dlp/pseudo/core/func/PseudoFuncDeclaration.java b/src/main/java/no/ssb/dlp/pseudo/core/func/PseudoFuncDeclaration.java index 5b1d94f..2f01bc0 100644 --- a/src/main/java/no/ssb/dlp/pseudo/core/func/PseudoFuncDeclaration.java +++ b/src/main/java/no/ssb/dlp/pseudo/core/func/PseudoFuncDeclaration.java @@ -10,6 +10,7 @@ // TODO: Support values wrapped by quotes (for values that need to use special characters like commas or parentheses) public class PseudoFuncDeclaration { + public static final String KEY_REFERENCE = "keyId"; private final String funcName; private final Map args; @@ -38,7 +39,7 @@ public static PseudoFuncDeclaration fromString(final String funcDeclStr) { // compatibility by assuming the param name to be 'keyId'. // This should be removed if/when we no longer support the fpe- function family. if (funcName.startsWith(PseudoFuncNames.FPE)) { - return new String[] {"keyId", kv.trim()}; // For backwards compatibility. Should be removed if we phase out fpe- functions + return new String[] {KEY_REFERENCE, kv.trim()}; // For backwards compatibility. Should be removed if we phase out fpe- functions } throw new InvalidPseudoFuncParam("Pseudo func param should be on the format 'key=value', but was '" + kv.trim() + "'. Func declaration:" + funcDeclStr); }