Class SecretUtil

java.lang.Object
org.drasyl.util.SecretUtil

public final class SecretUtil extends Object
Utility class for security-related operations.
  • Method Details

    • maskSecret

      public static String maskSecret(Object secret)
      This method replaces each character in the return of secret's Object.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