// Path: src/main/java/at/archistar/crypto/data/InvalidParametersException.java
// public class InvalidParametersException extends Exception {
// 
//     public InvalidParametersException(String msg) {
//         super(msg);
//     }
// }
// 
// Path: src/main/java/at/archistar/crypto/secretsharing/WeakSecurityException.java
// public class WeakSecurityException extends Exception {
// 
//     /**
//      * create a new exception that denotes that an algorithm was configured
//      * in such a way, that it would yield no security or privacy
//      *
//      * @param msg an detailed error message
//      */
//     public WeakSecurityException(String msg) {
//         super(msg);
//     }
// }


import at.archistar.crypto.data.InvalidParametersException;
import at.archistar.crypto.random.RandomSource;
import at.archistar.crypto.secretsharing.WeakSecurityException;
import java.security.NoSuchAlgorithmException;
package at.archistar.crypto;



/**
 * @author florian
 */
public class CryptoEngineFactory {

    /**
     * Computational Secure Secret Sharing with Fingerprinting
     */
    public static CSSEngine getCSSEngine(int n, int k) throws WeakSecurityException {
        return new CSSEngine(n, k);
    }

    /**
     * Computational Secure Secret Sharing with Fingerprinting (custom Random Number Generator)
     */
    public static CSSEngine getCSSEngine(int n, int k, RandomSource rng) throws WeakSecurityException {
        return new CSSEngine(n, k, rng);
    }

    /**
     * Computational Secure Secret Sharing with Fingerprinting (custom Random Number Generator)
     * <p>
     * This variant will use the given key to encrypt all generated keys before secret-sharing
     */
// Path: src/main/java/at/archistar/crypto/data/InvalidParametersException.java
// public class InvalidParametersException extends Exception {
// 
//     public InvalidParametersException(String msg) {
//         super(msg);
//     }
// }
// 
// Path: src/main/java/at/archistar/crypto/secretsharing/WeakSecurityException.java
// public class WeakSecurityException extends Exception {
// 
//     /**
//      * create a new exception that denotes that an algorithm was configured
//      * in such a way, that it would yield no security or privacy
//      *
//      * @param msg an detailed error message
//      */
//     public WeakSecurityException(String msg) {
//         super(msg);
//     }
// }


// Path: src/main/java/at/archistar/crypto/CryptoEngineFactory.java
import at.archistar.crypto.data.InvalidParametersException;
import at.archistar.crypto.random.RandomSource;
import at.archistar.crypto.secretsharing.WeakSecurityException;
import java.security.NoSuchAlgorithmException;

package at.archistar.crypto;



/**
 * @author florian
 */
public class CryptoEngineFactory {

    /**
     * Computational Secure Secret Sharing with Fingerprinting
     */
    public static CSSEngine getCSSEngine(int n, int k) throws WeakSecurityException {
        return new CSSEngine(n, k);
    }

    /**
     * Computational Secure Secret Sharing with Fingerprinting (custom Random Number Generator)
     */
    public static CSSEngine getCSSEngine(int n, int k, RandomSource rng) throws WeakSecurityException {
        return new CSSEngine(n, k, rng);
    }

    /**
     * Computational Secure Secret Sharing with Fingerprinting (custom Random Number Generator)
     * <p>
     * This variant will use the given key to encrypt all generated keys before secret-sharing
     */
    public static CSSEngine getCSSEngine(int n, int k, RandomSource rng, byte[] key) throws WeakSecurityException, InvalidParametersException {