// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final String cipherTransformation = encryptionAlgorithm + "/CBC/PKCS5Padding";
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final Decoder decoder = getUrlDecoder();
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final Encoder encoder = getUrlEncoder();
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final String encryptionAlgorithm = "AES";
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int encryptionKeyBytes = 16;
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int fernetKeyBytes = signingKeyBytes + encryptionKeyBytes;
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final String signingAlgorithm = "HmacSHA256";
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int signingKeyBytes = 16;
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int tokenPrefixBytes = versionBytes + timestampBytes + initializationVectorBytes;


import static com.macasaet.fernet.Constants.cipherTransformation;
import static com.macasaet.fernet.Constants.decoder;
import static com.macasaet.fernet.Constants.encoder;
import static com.macasaet.fernet.Constants.encryptionAlgorithm;
import static com.macasaet.fernet.Constants.encryptionKeyBytes;
import static com.macasaet.fernet.Constants.fernetKeyBytes;
import static com.macasaet.fernet.Constants.signingAlgorithm;
import static com.macasaet.fernet.Constants.signingKeyBytes;
import static com.macasaet.fernet.Constants.tokenPrefixBytes;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.copyOfRange;
import static javax.crypto.Cipher.DECRYPT_MODE;
import static javax.crypto.Cipher.ENCRYPT_MODE;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.time.Instant;
import java.util.Arrays;
import java.util.Base64.Encoder;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.Mac;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
     */
    protected SecretKeySpec getEncryptionKeySpec() {
        return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm());
    }

    /**
     * Warning: Modifying the returned byte array will write through to this object.
     *
     * @return the raw underlying signing key bytes
     */
    @SuppressWarnings("PMD.MethodReturnsInternalArray")
    protected byte[] getSigningKey() {
        return signingKey;
    }

    /**
     * Warning: Modifying the returned byte array will write through to this object.
     *
     * @return the raw underlying encryption key bytes
     */
    @SuppressWarnings("PMD.MethodReturnsInternalArray")
    protected byte[] getEncryptionKey() {
        return encryptionKey;
    }

    protected int getTokenPrefixBytes() {
        return tokenPrefixBytes;
    }

    protected String getSigningAlgorithm() {
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final String cipherTransformation = encryptionAlgorithm + "/CBC/PKCS5Padding";
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final Decoder decoder = getUrlDecoder();
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final Encoder encoder = getUrlEncoder();
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final String encryptionAlgorithm = "AES";
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int encryptionKeyBytes = 16;
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int fernetKeyBytes = signingKeyBytes + encryptionKeyBytes;
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final String signingAlgorithm = "HmacSHA256";
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int signingKeyBytes = 16;
// 
// Path: fernet-java8/src/main/java/com/macasaet/fernet/Constants.java
// static final int tokenPrefixBytes = versionBytes + timestampBytes + initializationVectorBytes;


// Path: fernet-java8/src/main/java/com/macasaet/fernet/Key.java
import static com.macasaet.fernet.Constants.cipherTransformation;
import static com.macasaet.fernet.Constants.decoder;
import static com.macasaet.fernet.Constants.encoder;
import static com.macasaet.fernet.Constants.encryptionAlgorithm;
import static com.macasaet.fernet.Constants.encryptionKeyBytes;
import static com.macasaet.fernet.Constants.fernetKeyBytes;
import static com.macasaet.fernet.Constants.signingAlgorithm;
import static com.macasaet.fernet.Constants.signingKeyBytes;
import static com.macasaet.fernet.Constants.tokenPrefixBytes;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.copyOfRange;
import static javax.crypto.Cipher.DECRYPT_MODE;
import static javax.crypto.Cipher.ENCRYPT_MODE;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.time.Instant;
import java.util.Arrays;
import java.util.Base64.Encoder;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.Mac;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

     */
    protected SecretKeySpec getEncryptionKeySpec() {
        return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm());
    }

    /**
     * Warning: Modifying the returned byte array will write through to this object.
     *
     * @return the raw underlying signing key bytes
     */
    @SuppressWarnings("PMD.MethodReturnsInternalArray")
    protected byte[] getSigningKey() {
        return signingKey;
    }

    /**
     * Warning: Modifying the returned byte array will write through to this object.
     *
     * @return the raw underlying encryption key bytes
     */
    @SuppressWarnings("PMD.MethodReturnsInternalArray")
    protected byte[] getEncryptionKey() {
        return encryptionKey;
    }

    protected int getTokenPrefixBytes() {
        return tokenPrefixBytes;
    }

    protected String getSigningAlgorithm() {
        return signingAlgorithm;