-
depricated method needs changing
Hi there,
I'm trying to learn about encryption, so I downloaded an Open Source
package called Cryptix from the web. I am trying to run a test but
before I could do so JBuilder4 has been trying to compile the source
files from the Cryptix package and came across one depricated method
call that needs changing before I can proceed. The method resides in the
java.security.Security class.
method: getAlgorithmProperty(String algName, String propName)
Here's what the documentation says about the method:
*************************************************************
getAlgorithmProperty
public static String getAlgorithmProperty(String algName,
String propName)
Deprecated.
This method used to return the value of a proprietary property in the
master file of the "SUN" Cryptographic Service Provider in order to
determine how to parse algorithm-specific parameters. Use the new
provider-based and algorithm-independent AlgorithmParameters and
KeyFactory engine classes (introduced in the Java 2 platform) instead.
Gets a specified property for an algorithm. The algorithm name should be
a standard name. See Appendix A in the Java Cryptography Architecture
API Specification & Reference for information about standard algorithm
names. One possible use is by specialized algorithm parsers, which may
map classes to algorithms which they understand (much like Key parsers
do).Parameters:algName - the algorithm name.propName - the name of the
property to get.Returns:the value of the specified property.
***************************************************************
This is an example of how the method is being used in several classes
within the Cryptix package:
/**
* Expands the possible alias <i>algorithm</i> to a standard name.
If
* <i>algorithm</i> is not an alias, it is returned as-is. This
method
* does not check whether a corresponding algorithm implementation
exists.
* <p>
* Possible values for <i>type</i> include "Cipher", "Mode",
* "PaddingScheme", "MessageDigest", "Signature", "KeyGenerator",
* and "KeyPairGenerator". Other types can be configured in the
* IJCE.properties file.
*
* @param algorithm the possible alias
* @param type the type of algorithm
* @return the standard name
*/
public static String getStandardName(String algorithm, String type)
{
String temptype = "Alias."+type;
String standardName = Security.getAlgorithmProperty(algorithm,
temptype);
return (standardName != null) ? standardName : algorithm;
}
Could somebody help me understand what it is I need to do to change the
call to this depricated method so that I can get going with my testing?
I haven't a clue as to how to fix this.
Please Advise,
Alan Shiers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks