All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.polyglotted.crypto.AlgoConverter Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package org.polyglotted.crypto;

import com.beust.jcommander.IStringConverter;
import com.beust.jcommander.ParameterException;

public class AlgoConverter implements IStringConverter {
    @Override
    public Algo convert(String value) {
        try {
            return Algo.valueOf(value);
        }
        catch (Exception ex) {
            throw new ParameterException("illegal algorithm name");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy