Top Description Inners Fields Constructors Methods
org.bouncycastle.crypto.general

public final Class ARC4

extends Object
Class Inheritance
Imports
java.security.SecureRandom, org.bouncycastle.crypto.Algorithm, .IllegalKeyException, .SymmetricKey, .SymmetricSecretKey, org.bouncycastle.crypto.internal.CipherParameters, .KeyGenerationParameters, .StreamCipher, .ValidatedSymmetricKey, org.bouncycastle.crypto.internal.params.KeyParameter, .KeyParameterImpl, org.bouncycastle.util.Arrays, org.bouncycastle.util.encoders.Hex

Source class for implementations of ARC4 based algorithms.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class
ARC4.KeyGenerator

ARC4/RC4 key generator.

public static class
ARC4.OperatorFactory

Factory for basic ARC4/RC4 encryption/decryption operators.

public static class
ARC4.Parameters

Parameters for ARC4/RC4 cipher modes.

Field Summary

Modifier and TypeField and Description
public static final GeneralAlgorithm
ALGORITHM

Raw ARC4 algorithm, can be used for creating general purpose ARC4 keys.

private static final ARC4.EngineProvider
public static final ARC4.Parameters

Constructor Summary

AccessConstructor and Description
private
ARC4()

Method Summary

Modifier and TypeMethod and Description
private static boolean
invalidKeySize(int keyLength)

private static ValidatedSymmetricKey
validateKey(SymmetricKey key, Algorithm paramAlgorithm)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALGORITHMback to summary
public static final GeneralAlgorithm ALGORITHM

Raw ARC4 algorithm, can be used for creating general purpose ARC4 keys.

ENGINE_PROVIDERback to summary
private static final ARC4.EngineProvider ENGINE_PROVIDER
STREAMback to summary
public static final ARC4.Parameters STREAM

Constructor Detail

ARC4back to summary
private ARC4()

Method Detail

invalidKeySizeback to summary
private static boolean invalidKeySize(int keyLength)
validateKeyback to summary
private static ValidatedSymmetricKey validateKey(SymmetricKey key, Algorithm paramAlgorithm)
org.bouncycastle.crypto.general back to summary

private final Class ARC4.EngineProvider

extends Object
implements EngineProvider<ARC4Engine>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.internal.EngineProvider

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public ARC4Engine
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EngineProviderback to summary
private EngineProvider()

Method Detail

createEngineback to summary
public ARC4Engine createEngine()

Implements org.bouncycastle.crypto.internal.EngineProvider.createEngine.

org.bouncycastle.crypto.general back to summary

public final Class ARC4.KeyGenerator

extends GuardedSymmetricKeyGenerator
Class Inheritance

ARC4/RC4 key generator.

Field Summary

Modifier and TypeField and Description
private final GeneralAlgorithm
private final int
private final SecureRandom

Constructor Summary

AccessConstructor and Description
public
KeyGenerator(int keySizeInBits, SecureRandom random)

Method Summary

Modifier and TypeMethod and Description
public SymmetricKey
Inherited from org.bouncycastle.crypto.general.GuardedSymmetricKeyGenerator:
generateKey

Field Detail

algorithmback to summary
private final GeneralAlgorithm algorithm
keySizeInBitsback to summary
private final int keySizeInBits
randomback to summary
private final SecureRandom random

Constructor Detail

KeyGeneratorback to summary
public KeyGenerator(int keySizeInBits, SecureRandom random)

Method Detail

doGenerateKeyback to summary
public SymmetricKey doGenerateKey()

Implements abstract org.bouncycastle.crypto.general.GuardedSymmetricKeyGenerator.doGenerateKey.

org.bouncycastle.crypto.general back to summary

public final Class ARC4.OperatorFactory

extends GuardedSymmetricStreamOperatorFactory<ARC4.Parameters>
Class Inheritance

Factory for basic ARC4/RC4 encryption/decryption operators.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected StreamCipher
Inherited from org.bouncycastle.crypto.general.GuardedSymmetricStreamOperatorFactory:
createInputDecryptorcreateOutputDecryptorcreateOutputEncryptor

Constructor Detail

OperatorFactoryback to summary
public OperatorFactory()

Method Detail

createCipherback to summary
protected StreamCipher createCipher(boolean forEncryption, SymmetricKey key, ARC4.Parameters parameters, SecureRandom random)

Implements abstract org.bouncycastle.crypto.general.GuardedSymmetricStreamOperatorFactory.createCipher.

Annotations
@Override
org.bouncycastle.crypto.general back to summary

public final Class ARC4.Parameters

extends GeneralParameters
Class Inheritance

Parameters for ARC4/RC4 cipher modes.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from org.bouncycastle.crypto.general.GeneralParameters:
getAlgorithm

Constructor Detail

Parametersback to summary
pack-priv Parameters()