2362N/A * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * This class specifies a DES-EDE ("triple-DES") key. 0N/A * The constant which defines the length of a DESede key in bytes. 0N/A * Creates a DESedeKeySpec object using the first 24 bytes in 0N/A * <code>key</code> as the key material for the DES-EDE key. 0N/A * <p> The bytes that constitute the DES-EDE key are those between 0N/A * <code>key[0]</code> and <code>key[23]</code> inclusive 0N/A * @param key the buffer with the DES-EDE key material. The first 0N/A * 24 bytes of the buffer are copied to protect against subsequent 0N/A * @exception NullPointerException if <code>key</code> is null. 0N/A * @exception InvalidKeyException if the given key material is shorter 0N/A * Creates a DESedeKeySpec object using the first 24 bytes in 0N/A * <code>key</code>, beginning at <code>offset</code> inclusive, 0N/A * as the key material for the DES-EDE key. 0N/A * <p> The bytes that constitute the DES-EDE key are those between 0N/A * <code>key[offset]</code> and <code>key[offset+23]</code> inclusive. 0N/A * @param key the buffer with the DES-EDE key material. The first 0N/A * 24 bytes of the buffer beginning at <code>offset</code> inclusive 0N/A * are copied to protect against subsequent modification. 0N/A * @param offset the offset in <code>key</code>, where the DES-EDE key 0N/A * @exception NullPointerException if <code>key</code> is null. 0N/A * @exception InvalidKeyException if the given key material, starting at 0N/A * <code>offset</code> inclusive, is shorter than 24 bytes 0N/A * Returns the DES-EDE key. 0N/A * @return the DES-EDE key. Returns a new array 0N/A * each time this method is called. 0N/A * Checks if the given DES-EDE key, starting at <code>offset</code> 0N/A * inclusive, is parity-adjusted. 0N/A * @param key a byte array which holds the key value 0N/A * @param offset the offset into the byte array 0N/A * @return true if the given DES-EDE key is parity-adjusted, false 0N/A * @exception NullPointerException if <code>key</code> is null. 0N/A * @exception InvalidKeyException if the given key material, starting at 0N/A * <code>offset</code> inclusive, is shorter than 24 bytes