🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1350

depricated method needs changing

#1350
From: Alan Shiers
Date: Thu, 14 Mar 2002 18:59
71 lines
3757 bytes
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
Technical Details
Message-ID: <3C90F31C.CDF9827D@hfx.eastlink.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1089d0,52e48f773d85bf92,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-03-14 10:04:39 PST
Message-ID: <3C90F31C.CDF9827D@hfx.eastlink.ca>
Date: Thu, 14 Mar 2002 13:59:40 -0500
From: Alan Shiers <ashiers@hfx.eastlink.ca>
Organization: Mustard Seed Software
X-Mailer: Mozilla 4.78 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: depricated method needs changing
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 24.222.101.2
X-Trace: dnews 1016128844 24.222.101.2 (14 Mar 2002 10:00:44 -0800)
Lines: 71
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!iad-peer.news.verio.net!news.verio.net!fu-berlin.de!news.boerde.de!nntp.cs.uni-magdeburg.de!PeerFeed.KWeb.on.ca!dnews