<commit_before>/**
 *  Copyright (C) 2016 <NAME>. All rights reserved.
 *
 *  See the NOTICE.txt file distributed with this work for additional
 *  information regarding copyright ownership.
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.garygregory.jcommander.converters.crypto;

import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Provider;

import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;

import com.garygregory.jcommander.converters.AbstractBaseConverter;

/**
 * Converts a {@link String} into a {@link Cipher}.
 * <p>
 * Example:
 * </p>
 * 
 * <pre>
 * <strong>&#64;Parameter</strong>(names = { "--cipher" }, <strong>converter</strong> = <strong>CipherConverter.class</strong>)
 * private <strong>Cipher</strong> cipher;
 * </pre>
 * <p>
 * For a description of the transformation parameter format, see {@link Cipher#getInstance(String)}.
 * </p>
 * <p>
 * To get a Cipher from a specific {@link Provider}, use the syntax {@code transformation:provider} as described by<commit_msg>Backout example (redoing them all in one go).<commit_after>/**
 *  Copyright (C) 2016 <NAME>. All rights reserved.
 *
 *  See the NOTICE.txt file distributed with this work for additional
 *  information regarding copyright ownership.
 *  
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *  
 *      http://www.apache.org/licenses/LICENSE-2.0
 *  
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

package com.garygregory.jcommander.converters.crypto;

import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.Provider;

import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;

import com.garygregory.jcommander.converters.AbstractBaseConverter;

/**
 * Converts a {@link String} into a {@link Cipher}.
 * <p>
 * For a description of the transformation parameter format, see {@link Cipher#getInstance(String)}.
 * </p>
 * <p>
 * To get a Cipher from a specific {@link Provider}, use the syntax {@code transformation:provider} as described by
{'fraction_non_alphanumeric': 0.09780111585165736, 'fraction_numerical': 0.00590744995077125, 'mean_word_length': 4.2281303602058316, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2146984', 'n_tokens_mistral': 845, 'n_tokens_neox': 830, 'n_words': 324}