public class CipherConverter extends AbstractBaseConverter<Cipher>
String into a Cipher.
For a description of the transformation parameter format, see Cipher.getInstance(String).
To get a Cipher from a specific Provider, use the syntax transformation:provider as described by
Cipher.getInstance(String, String).
Example:
@Parameter(names = { "--cipher" }, converter = CipherConverter.class)
private Cipher cipher;
Cipher,
Cipher.getInstance(String),
Cipher.getInstance(String, String)failOnNull, targetClass| Constructor and Description |
|---|
CipherConverter(String optionName)
Constructs a converter.
|
| Modifier and Type | Method and Description |
|---|---|
protected Cipher |
convertImpl(String value)
Converts a value.
|
convert, getErrorString, isSingle, newParameterException, newParameterException, split, toInt, toURIpublic CipherConverter(String optionName)
optionName - The option name, may be null.protected Cipher convertImpl(String value) throws NoSuchAlgorithmException, NoSuchPaddingException, NoSuchProviderException
AbstractBaseConverterconvertImpl in class AbstractBaseConverter<Cipher>value - the value to convertNoSuchAlgorithmExceptionNoSuchPaddingExceptionNoSuchProviderExceptionCopyright © 2016-2016 Gary Gregory. All Rights Reserved.
Use is subject to The Apache Software License, Version 2.0