KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derby > impl > services > jce > JCECipherFactoryBuilder


1 /*
2
3    Derby - Class org.apache.derby.iapi.services.crypto.JCECipherFactoryBuilder
4
5    Licensed to the Apache Software Foundation (ASF) under one or more
6    contributor license agreements. See the NOTICE file distributed with
7    this work for additional information regarding copyright ownership.
8    The ASF licenses this file to you under the Apache License, Version 2.0
9    (the "License"); you may not use this file except in compliance with
10    the License. You may obtain a copy of the License at
11
12       http://www.apache.org/licenses/LICENSE-2.0
13
14    Unless required by applicable law or agreed to in writing, software
15    distributed under the License is distributed on an "AS IS" BASIS,
16    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17    See the License for the specific language governing permissions and
18    limitations under the License.
19
20 */

21
22 package org.apache.derby.impl.services.jce;
23
24 import org.apache.derby.iapi.services.crypto.CipherFactory;
25 import org.apache.derby.iapi.services.crypto.CipherFactoryBuilder;
26 import org.apache.derby.iapi.error.StandardException;
27 import java.util.Properties JavaDoc;
28
29
30 /**
31  * Cipher Factory instance builder. New instances of the cipher
32  * factory are created based on the on the user specified
33  * encryption properties.
34  */

35
36 public class JCECipherFactoryBuilder implements CipherFactoryBuilder
37 {
38
39     
40     public JCECipherFactoryBuilder() {
41     }
42
43
44     /**
45      * Create an instance of the cipher factory.
46      *
47      * @param create true, if the database is getting configured
48      * for encryption.
49      * @param props encryption properties/attributes to use
50      * for creating the cipher factory.
51      * @param newAttrs true, if cipher factory has to be created using
52      * should using the new attributes specified by the user.
53      */

54     public CipherFactory createCipherFactory(boolean create,
55                                              Properties JavaDoc props,
56                                              boolean newAttrs)
57         throws StandardException
58
59     {
60         return new JCECipherFactory(create, props, newAttrs);
61     }
62 }
63
Popular Tags