1 package org.apache.fulcrum.jce.crypto;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with 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,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22
23 /**
24 * CryptoParameters used for encryption/decrytpion.
25 *
26 * @author <a href="mailto:siegfried.goeschl@it20one.at">Siegfried Goeschl</a>
27 */
28
29 public interface CryptoParameters
30 {
31 /** Parameter for PBEParameterSpec */
32 int COUNT = 20;
33
34 /**
35 * The password salt: update to a method to prevent malicious code bug.
36 *
37 * @return the salt
38 *
39 * */
40 public static byte[] Salt()
41 {
42 return new byte[]
43 {
44 (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
45 (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
46 };
47 }
48
49
50 /**
51 * The default crypto algorithm being used */
52 String ALGORITHM = "PBEWithMD5AndDES";}