Package org.drasyl.util
Class SecretUtil
- java.lang.Object
-
- org.drasyl.util.SecretUtil
-
public final class SecretUtil extends Object
Utility class for security-related operations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
maskSecret(Object secret)
This method replaces each character in the return ofsecret
'sObject.toString()
-call with a asterisk.
-
-
-
Method Detail
-
maskSecret
public static String maskSecret(Object secret)
This method replaces each character in the return ofsecret
'sObject.toString()
-call with a asterisk. Can be used to mask secrets (like private keys or passwords).- Parameters:
secret
- the secret to be masked- Returns:
- a masked secret
-
-