// Path: src/main/java/com/healthmarketscience/jackcess/crypt/InvalidCryptoConfigurationException.java
// public class InvalidCryptoConfigurationException extends IllegalStateException
// {
//   private static final long serialVersionUID = 20170130L;
// 
//   public InvalidCryptoConfigurationException(String msg) {
//     super(msg);
//   }
// 
//   public InvalidCryptoConfigurationException(String msg, Throwable t) {
//     super(msg, t);
//   }
// }


import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.util.Set;
import com.healthmarketscience.jackcess.crypt.InvalidCryptoConfigurationException;
import com.healthmarketscience.jackcess.impl.ByteUtil;
import com.healthmarketscience.jackcess.impl.CustomToStringStyle;
import com.healthmarketscience.jackcess.impl.UnsupportedCodecException;
import org.apache.commons.lang3.builder.ToStringBuilder;
  public int getKeySize() {
    return _keySize;
  }

  public int getProviderType() {
    return _providerType;
  }

  public String getCspName() {
    return _cspName;
  }

  public static EncryptionHeader read(ByteBuffer encProvBuf,
                                      Set<CryptoAlgorithm> validCryptoAlgos,
                                      Set<HashAlgorithm> validHashAlgos)
  {
    // read length of header
    int headerLen = encProvBuf.getInt();

    // read header (temporarily narrowing buf to header)
    int origLimit = encProvBuf.limit();
    int startPos = encProvBuf.position();
    encProvBuf.limit(startPos + headerLen);

    EncryptionHeader header = null;
    try {
      header = new EncryptionHeader(encProvBuf);

      // verify parameters
      if(!validCryptoAlgos.contains(header.getCryptoAlgorithm())) {
// Path: src/main/java/com/healthmarketscience/jackcess/crypt/InvalidCryptoConfigurationException.java
// public class InvalidCryptoConfigurationException extends IllegalStateException
// {
//   private static final long serialVersionUID = 20170130L;
// 
//   public InvalidCryptoConfigurationException(String msg) {
//     super(msg);
//   }
// 
//   public InvalidCryptoConfigurationException(String msg, Throwable t) {
//     super(msg, t);
//   }
// }


// Path: src/main/java/com/healthmarketscience/jackcess/crypt/impl/office/EncryptionHeader.java
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.util.Set;
import com.healthmarketscience.jackcess.crypt.InvalidCryptoConfigurationException;
import com.healthmarketscience.jackcess.impl.ByteUtil;
import com.healthmarketscience.jackcess.impl.CustomToStringStyle;
import com.healthmarketscience.jackcess.impl.UnsupportedCodecException;
import org.apache.commons.lang3.builder.ToStringBuilder;

  public int getKeySize() {
    return _keySize;
  }

  public int getProviderType() {
    return _providerType;
  }

  public String getCspName() {
    return _cspName;
  }

  public static EncryptionHeader read(ByteBuffer encProvBuf,
                                      Set<CryptoAlgorithm> validCryptoAlgos,
                                      Set<HashAlgorithm> validHashAlgos)
  {
    // read length of header
    int headerLen = encProvBuf.getInt();

    // read header (temporarily narrowing buf to header)
    int origLimit = encProvBuf.limit();
    int startPos = encProvBuf.position();
    encProvBuf.limit(startPos + headerLen);

    EncryptionHeader header = null;
    try {
      header = new EncryptionHeader(encProvBuf);

      // verify parameters
      if(!validCryptoAlgos.contains(header.getCryptoAlgorithm())) {
        throw new InvalidCryptoConfigurationException(