Name
PublicKeyAlgorithm
Synopsis
Classes that implement this interface are used to create public key objects. The JXTA crypto implementation for the platform may obtain an object that implements this interface.
When you want to
create a new public key (and its corresponding private key), you
obtain the PublicKeyAlgorithm
object and call the
setPublicKey( )
and setPrivateKey( )
methods without any arguments. This calculates and
creates a new public/private key pair. The data representing the
public and private keys can be obtained from the
getPublickey( )
and getPrivatekey( )
methods.
Conversely, if you’re working with an existing
public/private key pair, store the public key data in a
PublickeyData
object (and the private key data in
a PrivatekeyData
object) and use these objects to
initialize the PublicKeyAlgorithm
object by
passing them to the appropriate setPublickey( )
and setPrivatekey( )
methods.
public interface PublicKeyAlgorithm extends jxta.security.util.Description { // Public Constants public static final String name; // ="PublicKey Algorithm” // Property Accessor Methods (by property name) public abstract int getEncryptionBlockLength(); public abstract int getMaxInputDataBlockLength(); public abstract Object getPrivatekey() throws jxta.security.exceptions.CryptoException; public abstract void setPrivateKey(Object privatekeyData) throws jxta.security.exceptions.CryptoException; public abstract Object getPublickey() throws jxta.security.exceptions.CryptoException; ...
Get JXTA in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.