net.rim.device.api.crypto
Class DigestFactory

java.lang.Object
  extended by net.rim.device.api.crypto.DigestFactory

public abstract class DigestFactory
extends Object

Creates a digest.

For more information on the cryptographic algorithms supported by this factory, see Crypto Algorithms.

See Also:
DigestInputStream, DigestOutputStream
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

Constructor Summary
Category: Signed protected DigestFactory()
          Creates a DigestFactory object.
 
Method Summary
Category: Signed protected abstract  Digest create(String algorithm)
          Called to create the Digest.
Category: Signed static Enumeration getAlgorithms()
          Returns an Enumeration of String representing all of the registered algorithms with this factory.
Category: Signed protected abstract  String[] getFactoryAlgorithms()
          Called to determine what algorithms are supported.
Category: Signed static Digest getInstance(String algorithm)
          Constructs and returns a new Digest object.
Category: Signed static void register(DigestFactory factory)
          Registers the given Digest object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

DigestFactory

protected DigestFactory()
Creates a DigestFactory object.

This is the default constructor and is not used.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0


Method Detail

getInstance

public static Digest getInstance(String algorithm)
                          throws NoSuchAlgorithmException
Constructs and returns a new Digest object.

Parameters:
algorithm - The name of the digest to construct, eg "SHA1", "MD5", etc.
Returns:
The Digest.
Throws:
NoSuchAlgorithmException - Thrown if the digest cannot be constructed.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

register

public static void register(DigestFactory factory)
Registers the given Digest object.

If a previous call registered a Digest with the same algorithm name, then the new one will be ignored.

Parameters:
factory - The digest factory to be registered.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getAlgorithms

public static Enumeration getAlgorithms()
Returns an Enumeration of String representing all of the registered algorithms with this factory.

Returns:
An Enumeration of Strings representing all of the registered algorithms with this factory.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

getFactoryAlgorithms

protected abstract String[] getFactoryAlgorithms()
Called to determine what algorithms are supported.

Returns:
A String array representing the names of the algorithms.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0

create

protected abstract Digest create(String algorithm)
                          throws NoSuchAlgorithmException
Called to create the Digest.

Parameters:
algorithm - The algorithm used to create the digest.
Returns:
The Digest.
Throws:
NoSuchAlgorithmException - Thrown if the specified algorithm was not valid.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 3.6.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal