asciiencodedkeyspec.java

来自「面向应用的智能安全代理平台和工具包是一个综合网络应用的安全共性需求而设计和实现的」· Java 代码 · 共 57 行

JAVA
57
字号
package au.net.aba.crypto.spec;

/*
 * $Id: AsciiEncodedKeySpec.java,v 1.4 1998/10/26 01:46:47 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/spec/AsciiEncodedKeySpec.java,v $
 * $Revision: 1.4 $
 * $Date: 1998/10/26 01:46:47 $
 * $State: Exp $
 */

import java.security.spec.EncodedKeySpec;

/**
 * A key in an ASCII encoded format. ASCII encoded key specs are expected to
 * be an array of UTF8 characters representing a hexadecimal number, or a
 * set of hexadecimal numbers. Specs made of more than 1 number, such as an
 * RSAPrivateKey have the numbers separated by '.' characters, and the numbers
 * are given in the same order as the equivalent key spec class; e.g an
 * RSAPrivate key is the string "modulus.privateExponent" where modulus
 * and privateExponent are both the hex representations of big numbers.
 */
public class AsciiEncodedKeySpec
	extends EncodedKeySpec
{
	public final static String ident = "$Id: AsciiEncodedKeySpec.java,v 1.4 1998/10/26 01:46:47 leachbj Exp $";

	/**
	 * Create the KeySpec from the given string.
	 */
	public AsciiEncodedKeySpec(String key)
	{
		super(key.getBytes());
	}
	/**
	 * Returns the name of the encoding format used by this
	 * key specification.
	 *
	 * @return the string "ASCII"
	 */
	public String getFormat()
	{
		return "ASCII";
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?