View Javadoc
1   /*-
2    * #%L
3    * Secured Properties
4    * ===============================================================
5    * Copyright (C) 2016 - 2019 Brabenetz Harald, Austria
6    * ===============================================================
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * #L%
19   */
20  package net.brabenetz.lib.securedproperties.config;
21  
22  import net.brabenetz.lib.securedproperties.core.Algorithm;
23  
24  import java.io.File;
25  
26  /**
27   * Needed available methods to use the {@link ConfigInitializer}.
28   */
29  public interface Config {
30  
31      /**
32       * Overwrite the default location "%user_home%/.secret/securedProperties.key" for the secret key to encrypt and decrypt values.
33       *
34       * @param newSecretFile the secret File
35       * @return this for fluent style.
36       */
37      Config withSecretFile(File newSecretFile);
38  
39      Config withSaltLength(int newSaltLength);
40  
41      Config withAllowedAlgorithm(Algorithm... newAllowedAlgorithm);
42  
43      Config withAutoCreateSecretKey(boolean autoCreate);
44  
45  }