Home » geronimo-2.2-source-release » org.apache.geronimo.crypto.crypto.params » [javadoc | source]
public class: DESParameters [javadoc | source]

All Implemented Interfaces:

Direct Known Subclasses:

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You 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.
Field Summary
public static final  int DES_KEY_LENGTH     
 public DESParameters(byte[] key) 
Method from org.apache.geronimo.crypto.crypto.params.DESParameters Summary:
isWeakKey,   setOddParity
Methods from org.apache.geronimo.crypto.crypto.params.KeyParameter:
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.geronimo.crypto.crypto.params.DESParameters Detail:
 public static boolean isWeakKey(byte[] key,
    int offset) 
    DES has 16 weak keys. This method will check if the given DES key material is weak or semi-weak. Key material that is too short is regarded as weak.

    See "Applied Cryptography" by Bruce Schneier for more information.

 public static  void setOddParity(byte[] bytes) 
    DES Keys use the LSB as the odd parity bit. This can be used to check for corrupt keys.