The JxtaCrypto Interface

Classes that implement the JxtaCrypto interface (jxta.security.crypto.JxtaCrypto) provide one of the main interfaces to the JXTA security API. This interface contains a number of methods, each of which is used to obtain a class that performs a particular operation. If you’re familiar with the security implementation of the Java 2 Standard Edition platform, you can think of the JxtaCrypto interface as a simple provider (except that there is no provider infrastructure; you obtain a JxtaCrypto object directly).

The JxtaCryptoSuite class (jxta.security.impl.crypto.JxtaCryptoSuite) implements the JxtaCrypto interface in the bindings that come with JXTA. The idea here is that different JXTA implementations will supply a JXTA crypto class that supports a profile of operations that are suitable for the platform on which the implementation runs. Therefore, the crypto suite is instantiated with information that defines the security profile that the application requires.

The JxtaCrypto interface defines the following profiles:

static final byte PROFILE_RSA_RC4_SHA1;
static final byte PROFILE_RSA_RC4_MD5;
static final byte PROFILE_RSA_SHA1;
static final byte PROFILE_RSA_MD5;
static final byte PROFILE_RSA_RC4_SHA1_MD5;
static final byte PROFILE_RC4_SHA1;
static final byte PROFILE_RC4_MD5;

Each constant in the name of a profile determines a particular algorithm that the profile supports: RSA algorithms, RC4 encryption, SHA-1 message digests, and MD5 message digests. ...

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.