Name
KeyBuilder
Synopsis
This class is used to create keys in
the standard JXTA binding. The buildKey( )
method
is used to create secret keys (either DES or RC4) or RSA keys, based
on the type passed to the method. Once the key is returned, it needs
to be initialized. Initialization is specific to the type of key
returned, which will be either a secret key or an RSA key. Use of
this class is common, since it’s the basic way to
create keys.
public class KeyBuilder { // Public Constructors public KeyBuilder(); // Public Constants public static final short LENGTH_RC4; // =128 public static final short LENGTH_RSA_512; // =512 public static final short LENGTH_RSA_MIN; // =384 public static final byte TYPE_DES; // =4 public static final byte TYPE_RC4; // =8 public static final byte TYPE_RSA; // =3 public static final byte TYPE_RSA_PRIVATE; // =2 public static final byte TYPE_RSA_PUBLIC; // =1 // Public Class Methods public static jxta.security.cipher.Key buildKey(byte keyType, short keyLength, boolean notUsed) 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.