You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/eu/righettod/SecurityUtils.java
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -673,20 +673,21 @@ public static boolean isExcelCSVSafe(String csvFilePath) {
673
673
}
674
674
675
675
/**
676
-
* Provide a way to add an integrity marker (<a href="https://cryptobook.nakov.com/mac-and-key-derivation">HMAC</a>) to a serialized object serialized using the <a href="https://www.baeldung.com/java-serialization">java native system</a> (binary).<br>
676
+
* Provide a way to add an integrity marker (<a href="https://en.wikipedia.org/wiki/HMAC">HMAC</a>) to a serialized object serialized using the <a href="https://www.baeldung.com/java-serialization">java native system</a> (binary).<br>
677
677
* The goal is to provide <b>a temporary workaround</b> to try to prevent deserialization attacks and give time to move to a text-based serialization approach.
678
678
*
679
-
* @param processingMode Define the mode of processing i.e. protect or validate.
679
+
* @param processingMode Define the mode of processing i.e. protect or validate. ({@link eu.righettod.ProcessingMode})
680
680
* @param input When the processing mode is "protect" than the expected input (string) is a java serialized object encoded in Base64 otherwise (processing mode is "validate") expected input is the output of this method when the "protect" mode was used.
681
-
* @param secret Secret to use to compute the HMAC.
681
+
* @param secret Secret to use to compute the SHA256 HMAC.
682
682
* @return A map with the following keys: <ul><li><b>PROCESSING_MODE</b>: Processing mode used to compute the result.</li><li><b>STATUS</b>: A boolean indicating if the processing was successful or not.</li><li><b>RESULT</b>: Always contains a string representing the protected serialized object in the format <code>[SERIALIZED_OBJECT_BASE64_ENCODED]:[SERIALIZED_OBJECT_HMAC_BASE64_ENCODED]</code>.</li></ul>
0 commit comments