Class EncryptUtils

java.lang.Object
org.sejda.sambox.encryption.EncryptUtils

final class EncryptUtils extends Object
Utilities for encryption related tasks
  • Field Details

    • ENCRYPT_PADDING

      public static final byte[] ENCRYPT_PADDING
  • Constructor Details

    • EncryptUtils

      private EncryptUtils()
  • Method Details

    • padOrTruncate

      public static byte[] padOrTruncate(byte[] input)
      Performs pad or truncate to a 32 bytes array as specified in Algo2 and Algo3
      Parameters:
      input -
      Returns:
    • truncate127

      public static byte[] truncate127(byte[] input)
      Parameters:
      input -
      Returns:
      the input array truncated to a max length of 127
    • rnd

      public static byte[] rnd(int length)
      Parameters:
      length -
      Returns:
      an array of the given length with random byte values