?? ideakey.java
字號:
package au.net.aba.crypto.provider;
/*
* $Id: IDEAKey.java,v 1.5 1999/01/18 04:59:30 leachbj Exp $
* $Author: leachbj $
*
* Copyright (C) 1996-1998 Australian Business Access Pty Ltd.
* All rights reserved.
*
* Use, modification, copying and distribution of this software is subject the
* terms and conditions of the ABA Public Licence. See the file
* "PUBLIC_LICENCE" for additional information.
*
* If you have not received a copy of the Public Licence, you must destroy all
* copies of this file immediately.
*
* $Source: /aba/CVSROOT/jdk1.1/src/au.net.aba/crypto/provider/IDEAKey.java,v $
* $Revision: 1.5 $
* $Date: 1999/01/18 04:59:30 $
* $State: Exp $
*/
import au.net.aba.crypto.spec.IDEAKeySpec;
import javax.crypto.SecretKey;
/**
* A class wrapper for Idea keys.
*/
public class IDEAKey implements SecretKey
{
public final static String ident = "$Id: IDEAKey.java,v 1.5 1999/01/18 04:59:30 leachbj Exp $";
private byte[] key;
/**
* the basic constructor
*/
public IDEAKey(
byte[] rawKey)
{
key = new byte[IDEAKeySpec.IDEA_KEY_LEN];
System.arraycopy(rawKey, 0, key, 0, IDEAKeySpec.IDEA_KEY_LEN);
}
/**
* returns the algorithm for this key.
*
* @return the string "IDEA"
*/
public String getAlgorithm()
{
return "IDEA";
}
/**
* returns an encoded representation of this key.
*
* @return the key as a set of bytes.
*/
public byte[] getEncoded()
{
byte[] tmp;
tmp = new byte[IDEAKeySpec.IDEA_KEY_LEN];
System.arraycopy(key, 0, tmp, 0, IDEAKeySpec.IDEA_KEY_LEN);
return tmp;
}
/**
* returns the format for this key.
*
* @return the string "RAW"
*/
public String getFormat()
{
return "RAW";
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -