java.lang.Object
org.sejda.sambox.encryption.EncryptUtils
Utilities for encryption related tasks
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]padOrTruncate(byte[] input) Performs pad or truncate to a 32 bytes array as specified in Algo2 and Algo3static byte[]rnd(int length) static byte[]truncate127(byte[] input)
-
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
-