Class PaddingUtils

java.lang.Object
org.keycloak.common.util.PaddingUtils

public class PaddingUtils extends Object
Author:
Marek Posolda
  • Constructor Details

    • PaddingUtils

      public PaddingUtils()
  • Method Details

    • padding

      public static String padding(String rawString, int maxPaddingLength)
      Applies padding to given string up to specified number of characters. If given string is shorter or same as maxPaddingLength, it will just return the original string. Otherwise it would be padded with "\0" character to have at least "maxPaddingLength" characters
      Parameters:
      rawString - raw string
      maxPaddingLength - max padding length
      Returns:
      padded output