diff options
author | Casey Marshall <csm@gnu.org> | 2006-01-26 02:25:07 +0000 |
---|---|---|
committer | Casey Marshall <csm@gnu.org> | 2006-01-26 02:25:07 +0000 |
commit | bd5a522ce73b442dd07099c264bf251e6d8d6a63 (patch) | |
tree | b1cdc8f04689d9ea082589d3a7e61fef847ac1fa /gnu/javax/crypto/cipher/CipherFactory.java | |
parent | bf20436907439f2c47dc22eea41b3d3d5808aa74 (diff) | |
download | classpath-bd5a522ce73b442dd07099c264bf251e6d8d6a63.tar.gz |
2006-01-25 Casey Marshall <csm@gnu.org>
Merging GNU Crypto and Jessie.
* NEWS: mention the merge in the 0.21 notes.
* gnu/classpath/debug/Component.java (SSL_APPLICATION): removed.
(SSL_RECORD_LAYER): new constants.
* gnu/java/security/provider/Gnu.java (<init>): add new algorithms
to provider.
* resource/java/security/classpath.security: add new providers.
* gnu/javax/crypto/assembly/Assembly.java,
gnu/javax/crypto/assembly/Cascade.java,
gnu/javax/crypto/assembly/CascadeStage.java,
gnu/javax/crypto/assembly/CascadeTransformer.java,
gnu/javax/crypto/assembly/DeflateTransformer.java,
gnu/javax/crypto/assembly/Direction.java,
gnu/javax/crypto/assembly/LoopbackTransformer.java,
gnu/javax/crypto/assembly/ModeStage.java,
gnu/javax/crypto/assembly/Operation.java,
gnu/javax/crypto/assembly/PaddingTransformer.java,
gnu/javax/crypto/assembly/Stage.java,
gnu/javax/crypto/assembly/Transformer.java,
gnu/javax/crypto/assembly/TransformerException.java,
gnu/javax/crypto/cipher/Anubis.java,
gnu/javax/crypto/cipher/BaseCipher.java,
gnu/javax/crypto/cipher/Blowfish.java,
gnu/javax/crypto/cipher/Cast5.java,
gnu/javax/crypto/cipher/CipherFactory.java,
gnu/javax/crypto/cipher/DES.java,
gnu/javax/crypto/cipher/IBlockCipher.java,
gnu/javax/crypto/cipher/IBlockCipherSpi.java,
gnu/javax/crypto/cipher/Khazad.java,
gnu/javax/crypto/cipher/NullCipher.java,
gnu/javax/crypto/cipher/Rijndael.java,
gnu/javax/crypto/cipher/Serpent.java,
gnu/javax/crypto/cipher/Square.java,
gnu/javax/crypto/cipher/TripleDES.java,
gnu/javax/crypto/cipher/Twofish.java,
gnu/javax/crypto/cipher/WeakKeyException.java,
gnu/javax/crypto/jce/GnuCrypto.java,
gnu/javax/crypto/jce/GnuSasl.java,
gnu/javax/crypto/jce/PBKDF2SecretKeyFactory.java,
gnu/javax/crypto/jce/cipher/AESSpi.java,
gnu/javax/crypto/jce/cipher/ARCFourSpi.java,
gnu/javax/crypto/jce/cipher/AnubisSpi.java,
gnu/javax/crypto/jce/cipher/BlowfishSpi.java,
gnu/javax/crypto/jce/cipher/Cast5Spi.java,
gnu/javax/crypto/jce/cipher/CipherAdapter.java,
gnu/javax/crypto/jce/cipher/DESSpi.java,
gnu/javax/crypto/jce/cipher/KhazadSpi.java,
gnu/javax/crypto/jce/cipher/NullCipherSpi.java,
gnu/javax/crypto/jce/cipher/PBES2.java,
gnu/javax/crypto/jce/cipher/RijndaelSpi.java,
gnu/javax/crypto/jce/cipher/SerpentSpi.java,
gnu/javax/crypto/jce/cipher/SquareSpi.java,
gnu/javax/crypto/jce/cipher/TripleDESSpi.java,
gnu/javax/crypto/jce/cipher/TwofishSpi.java,
gnu/javax/crypto/jce/key/AnubisKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/AnubisSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/BlowfishKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/BlowfishSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/Cast5KeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/Cast5SecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/DESKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/DESSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/DESedeSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/KhazadKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/KhazadSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/RijndaelKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/RijndaelSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/SecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/SecretKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/SerpentKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/SerpentSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/SquareKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/SquareSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/key/TripleDESKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/TwofishKeyGeneratorImpl.java,
gnu/javax/crypto/jce/key/TwofishSecretKeyFactoryImpl.java,
gnu/javax/crypto/jce/keyring/GnuKeyring.java,
gnu/javax/crypto/jce/mac/HMacHavalSpi.java,
gnu/javax/crypto/jce/mac/HMacMD2Spi.java,
gnu/javax/crypto/jce/mac/HMacMD4Spi.java,
gnu/javax/crypto/jce/mac/HMacMD5Spi.java,
gnu/javax/crypto/jce/mac/HMacRipeMD128Spi.java,
gnu/javax/crypto/jce/mac/HMacRipeMD160Spi.java,
gnu/javax/crypto/jce/mac/HMacSHA160Spi.java,
gnu/javax/crypto/jce/mac/HMacSHA256Spi.java,
gnu/javax/crypto/jce/mac/HMacSHA384Spi.java,
gnu/javax/crypto/jce/mac/HMacSHA512Spi.java,
gnu/javax/crypto/jce/mac/HMacTigerSpi.java,
gnu/javax/crypto/jce/mac/HMacWhirlpoolSpi.java,
gnu/javax/crypto/jce/mac/MacAdapter.java,
gnu/javax/crypto/jce/mac/OMacAnubisImpl.java,
gnu/javax/crypto/jce/mac/OMacBlowfishImpl.java,
gnu/javax/crypto/jce/mac/OMacCast5Impl.java,
gnu/javax/crypto/jce/mac/OMacDESImpl.java,
gnu/javax/crypto/jce/mac/OMacImpl.java,
gnu/javax/crypto/jce/mac/OMacKhazadImpl.java,
gnu/javax/crypto/jce/mac/OMacRijndaelImpl.java,
gnu/javax/crypto/jce/mac/OMacSerpentImpl.java,
gnu/javax/crypto/jce/mac/OMacSquareImpl.java,
gnu/javax/crypto/jce/mac/OMacTripleDESImpl.java,
gnu/javax/crypto/jce/mac/OMacTwofishImpl.java,
gnu/javax/crypto/jce/mac/TMMH16Spi.java,
gnu/javax/crypto/jce/mac/UHash32Spi.java,
gnu/javax/crypto/jce/mac/UMac32Spi.java,
gnu/javax/crypto/jce/params/BlockCipherParameters.java,
gnu/javax/crypto/jce/params/DEREncodingException.java,
gnu/javax/crypto/jce/params/DERReader.java,
gnu/javax/crypto/jce/params/DERWriter.java,
gnu/javax/crypto/jce/prng/ARCFourRandomSpi.java,
gnu/javax/crypto/jce/prng/CSPRNGSpi.java,
gnu/javax/crypto/jce/prng/FortunaImpl.java,
gnu/javax/crypto/jce/prng/ICMRandomSpi.java,
gnu/javax/crypto/jce/prng/UMacRandomSpi.java,
gnu/javax/crypto/jce/spec/BlockCipherParameterSpec.java,
gnu/javax/crypto/jce/spec/TMMHParameterSpec.java,
gnu/javax/crypto/jce/spec/UMac32ParameterSpec.java,
gnu/javax/crypto/key/BaseKeyAgreementParty.java,
gnu/javax/crypto/key/GnuSecretKey.java,
gnu/javax/crypto/key/IKeyAgreementParty.java,
gnu/javax/crypto/key/IncomingMessage.java,
gnu/javax/crypto/key/KeyAgreementException.java,
gnu/javax/crypto/key/KeyAgreementFactory.java,
gnu/javax/crypto/key/OutgoingMessage.java,
gnu/javax/crypto/key/dh/DHKeyPairRawCodec.java,
gnu/javax/crypto/key/dh/DiffieHellmanKeyAgreement.java,
gnu/javax/crypto/key/dh/DiffieHellmanReceiver.java,
gnu/javax/crypto/key/dh/DiffieHellmanSender.java,
gnu/javax/crypto/key/dh/ElGamalKeyAgreement.java,
gnu/javax/crypto/key/dh/ElGamalReceiver.java,
gnu/javax/crypto/key/dh/ElGamalSender.java,
gnu/javax/crypto/key/dh/GnuDHKey.java,
gnu/javax/crypto/key/dh/GnuDHKeyPairGenerator.java,
gnu/javax/crypto/key/dh/GnuDHPrivateKey.java,
gnu/javax/crypto/key/dh/GnuDHPublicKey.java,
gnu/javax/crypto/key/dh/RFC2631.java,
gnu/javax/crypto/key/srp6/SRP6Host.java,
gnu/javax/crypto/key/srp6/SRP6KeyAgreement.java,
gnu/javax/crypto/key/srp6/SRP6SaslClient.java,
gnu/javax/crypto/key/srp6/SRP6SaslServer.java,
gnu/javax/crypto/key/srp6/SRP6TLSClient.java,
gnu/javax/crypto/key/srp6/SRP6TLSServer.java,
gnu/javax/crypto/key/srp6/SRP6User.java,
gnu/javax/crypto/key/srp6/SRPAlgorithm.java,
gnu/javax/crypto/key/srp6/SRPKey.java,
gnu/javax/crypto/key/srp6/SRPKeyPairGenerator.java,
gnu/javax/crypto/key/srp6/SRPKeyPairRawCodec.java,
gnu/javax/crypto/key/srp6/SRPPrivateKey.java,
gnu/javax/crypto/key/srp6/SRPPublicKey.java,
gnu/javax/crypto/keyring/AuthenticatedEntry.java,
gnu/javax/crypto/keyring/BaseKeyring.java,
gnu/javax/crypto/keyring/BinaryDataEntry.java,
gnu/javax/crypto/keyring/CertPathEntry.java,
gnu/javax/crypto/keyring/CertificateEntry.java,
gnu/javax/crypto/keyring/CompressedEntry.java,
gnu/javax/crypto/keyring/EncryptedEntry.java,
gnu/javax/crypto/keyring/Entry.java,
gnu/javax/crypto/keyring/EnvelopeEntry.java,
gnu/javax/crypto/keyring/GnuPrivateKeyring.java,
gnu/javax/crypto/keyring/GnuPublicKeyring.java,
gnu/javax/crypto/keyring/IKeyring.java,
gnu/javax/crypto/keyring/IPrivateKeyring.java,
gnu/javax/crypto/keyring/IPublicKeyring.java,
gnu/javax/crypto/keyring/MalformedKeyringException.java,
gnu/javax/crypto/keyring/MaskableEnvelopeEntry.java,
gnu/javax/crypto/keyring/MeteredInputStream.java,
gnu/javax/crypto/keyring/PasswordAuthenticatedEntry.java,
gnu/javax/crypto/keyring/PasswordEncryptedEntry.java,
gnu/javax/crypto/keyring/PasswordProtectedEntry.java,
gnu/javax/crypto/keyring/PrimitiveEntry.java,
gnu/javax/crypto/keyring/PrivateKeyEntry.java,
gnu/javax/crypto/keyring/Properties.java,
gnu/javax/crypto/keyring/PublicKeyEntry.java,
gnu/javax/crypto/mac/BaseMac.java,
gnu/javax/crypto/mac/HMac.java,
gnu/javax/crypto/mac/HMacFactory.java,
gnu/javax/crypto/mac/IMac.java,
gnu/javax/crypto/mac/MacFactory.java,
gnu/javax/crypto/mac/MacInputStream.java,
gnu/javax/crypto/mac/MacOutputStream.java,
gnu/javax/crypto/mac/OMAC.java,
gnu/javax/crypto/mac/TMMH16.java,
gnu/javax/crypto/mac/UHash32.java,
gnu/javax/crypto/mac/UMac32.java,
gnu/javax/crypto/mode/BaseMode.java,
gnu/javax/crypto/mode/CBC.java,
gnu/javax/crypto/mode/CFB.java,
gnu/javax/crypto/mode/CTR.java,
gnu/javax/crypto/mode/EAX.java,
gnu/javax/crypto/mode/ECB.java,
gnu/javax/crypto/mode/IAuthenticatedMode.java,
gnu/javax/crypto/mode/ICM.java,
gnu/javax/crypto/mode/IMode.java,
gnu/javax/crypto/mode/ModeFactory.java,
gnu/javax/crypto/mode/OFB.java,
gnu/javax/crypto/pad/BasePad.java,
gnu/javax/crypto/pad/IPad.java,
gnu/javax/crypto/pad/PKCS1_V1_5.java,
gnu/javax/crypto/pad/PKCS7.java,
gnu/javax/crypto/pad/PadFactory.java,
gnu/javax/crypto/pad/SSL3.java,
gnu/javax/crypto/pad/TBC.java,
gnu/javax/crypto/pad/TLS1.java,
gnu/javax/crypto/pad/WrongPaddingException.java,
gnu/javax/crypto/prng/ARCFour.java,
gnu/javax/crypto/prng/CSPRNG.java,
gnu/javax/crypto/prng/Fortuna.java,
gnu/javax/crypto/prng/ICMGenerator.java,
gnu/javax/crypto/prng/IPBE.java,
gnu/javax/crypto/prng/PBKDF2.java,
gnu/javax/crypto/prng/PRNGFactory.java,
gnu/javax/crypto/prng/UMacGenerator.java,
gnu/javax/crypto/sasl/AuthInfo.java,
gnu/javax/crypto/sasl/AuthInfoProviderFactory.java,
gnu/javax/crypto/sasl/ClientFactory.java,
gnu/javax/crypto/sasl/ClientMechanism.java,
gnu/javax/crypto/sasl/ConfidentialityException.java,
gnu/javax/crypto/sasl/IAuthInfoProvider.java,
gnu/javax/crypto/sasl/IAuthInfoProviderFactory.java,
gnu/javax/crypto/sasl/IllegalMechanismStateException.java,
gnu/javax/crypto/sasl/InputBuffer.java,
gnu/javax/crypto/sasl/IntegrityException.java,
gnu/javax/crypto/sasl/NoSuchMechanismException.java,
gnu/javax/crypto/sasl/NoSuchUserException.java,
gnu/javax/crypto/sasl/OutputBuffer.java,
gnu/javax/crypto/sasl/SaslEncodingException.java,
gnu/javax/crypto/sasl/SaslInputStream.java,
gnu/javax/crypto/sasl/SaslOutputStream.java,
gnu/javax/crypto/sasl/SaslUtil.java,
gnu/javax/crypto/sasl/ServerFactory.java,
gnu/javax/crypto/sasl/ServerMechanism.java,
gnu/javax/crypto/sasl/UserAlreadyExistsException.java,
gnu/javax/crypto/sasl/anonymous/AnonymousClient.java,
gnu/javax/crypto/sasl/anonymous/AnonymousServer.java,
gnu/javax/crypto/sasl/anonymous/AnonymousUtil.java,
gnu/javax/crypto/sasl/crammd5/CramMD5AuthInfoProvider.java,
gnu/javax/crypto/sasl/crammd5/CramMD5Client.java,
gnu/javax/crypto/sasl/crammd5/CramMD5Registry.java,
gnu/javax/crypto/sasl/crammd5/CramMD5Server.java,
gnu/javax/crypto/sasl/crammd5/CramMD5Util.java,
gnu/javax/crypto/sasl/crammd5/PasswordFile.java,
gnu/javax/crypto/sasl/plain/PasswordFile.java,
gnu/javax/crypto/sasl/plain/PlainAuthInfoProvider.java,
gnu/javax/crypto/sasl/plain/PlainClient.java,
gnu/javax/crypto/sasl/plain/PlainRegistry.java,
gnu/javax/crypto/sasl/plain/PlainServer.java,
gnu/javax/crypto/sasl/srp/CALG.java,
gnu/javax/crypto/sasl/srp/ClientStore.java,
gnu/javax/crypto/sasl/srp/IALG.java,
gnu/javax/crypto/sasl/srp/KDF.java,
gnu/javax/crypto/sasl/srp/PasswordFile.java,
gnu/javax/crypto/sasl/srp/SRP.java,
gnu/javax/crypto/sasl/srp/SRPAuthInfoProvider.java,
gnu/javax/crypto/sasl/srp/SRPClient.java,
gnu/javax/crypto/sasl/srp/SRPRegistry.java,
gnu/javax/crypto/sasl/srp/SRPServer.java,
gnu/javax/crypto/sasl/srp/SecurityContext.java,
gnu/javax/crypto/sasl/srp/ServerStore.java,
gnu/javax/crypto/sasl/srp/StoreEntry.java,
gnu/javax/net/ssl/Base64.java,
gnu/javax/net/ssl/EntropySource.java,
gnu/javax/net/ssl/NullManagerParameters.java,
gnu/javax/net/ssl/PrivateCredentials.java,
gnu/javax/net/ssl/SRPManagerParameters.java,
gnu/javax/net/ssl/SRPTrustManager.java,
gnu/javax/net/ssl/StaticTrustAnchors.java,
gnu/javax/net/ssl/provider/Alert.java,
gnu/javax/net/ssl/provider/AlertException.java,
gnu/javax/net/ssl/provider/Certificate.java,
gnu/javax/net/ssl/provider/CertificateRequest.java,
gnu/javax/net/ssl/provider/CertificateType.java,
gnu/javax/net/ssl/provider/CertificateVerify.java,
gnu/javax/net/ssl/provider/CipherSuite.java,
gnu/javax/net/ssl/provider/ClientHello.java,
gnu/javax/net/ssl/provider/ClientKeyExchange.java,
gnu/javax/net/ssl/provider/CompressionMethod.java,
gnu/javax/net/ssl/provider/Constructed.java,
gnu/javax/net/ssl/provider/ContentType.java,
gnu/javax/net/ssl/provider/Context.java,
gnu/javax/net/ssl/provider/DiffieHellman.java,
gnu/javax/net/ssl/provider/DigestInputStream.java,
gnu/javax/net/ssl/provider/DigestOutputStream.java,
gnu/javax/net/ssl/provider/Enumerated.java,
gnu/javax/net/ssl/provider/Extension.java,
gnu/javax/net/ssl/provider/Extensions.java,
gnu/javax/net/ssl/provider/Finished.java,
gnu/javax/net/ssl/provider/GNUSecurityParameters.java,
gnu/javax/net/ssl/provider/Handshake.java,
gnu/javax/net/ssl/provider/JCESecurityParameters.java,
gnu/javax/net/ssl/provider/JDBCSessionContext.java,
gnu/javax/net/ssl/provider/Jessie.java,
gnu/javax/net/ssl/provider/JessieDHPrivateKey.java,
gnu/javax/net/ssl/provider/JessieDHPublicKey.java,
gnu/javax/net/ssl/provider/JessieRSAPrivateKey.java,
gnu/javax/net/ssl/provider/JessieRSAPublicKey.java,
gnu/javax/net/ssl/provider/KeyPool.java,
gnu/javax/net/ssl/provider/MacException.java,
gnu/javax/net/ssl/provider/OverflowException.java,
gnu/javax/net/ssl/provider/PRNG.java,
gnu/javax/net/ssl/provider/ProtocolVersion.java,
gnu/javax/net/ssl/provider/Random.java,
gnu/javax/net/ssl/provider/RecordInput.java,
gnu/javax/net/ssl/provider/RecordInputStream.java,
gnu/javax/net/ssl/provider/RecordOutputStream.java,
gnu/javax/net/ssl/provider/RecordingInputStream.java,
gnu/javax/net/ssl/provider/SRPTrustManagerFactory.java,
gnu/javax/net/ssl/provider/SSLHMac.java,
gnu/javax/net/ssl/provider/SSLRSASignature.java,
gnu/javax/net/ssl/provider/SSLRandom.java,
gnu/javax/net/ssl/provider/SSLServerSocket.java,
gnu/javax/net/ssl/provider/SSLServerSocketFactory.java,
gnu/javax/net/ssl/provider/SSLSocket.java,
gnu/javax/net/ssl/provider/SSLSocketFactory.java,
gnu/javax/net/ssl/provider/SSLSocketInputStream.java,
gnu/javax/net/ssl/provider/SSLSocketOutputStream.java,
gnu/javax/net/ssl/provider/SecurityParameters.java,
gnu/javax/net/ssl/provider/ServerHello.java,
gnu/javax/net/ssl/provider/ServerKeyExchange.java,
gnu/javax/net/ssl/provider/Session.java,
gnu/javax/net/ssl/provider/SessionContext.java,
gnu/javax/net/ssl/provider/Signature.java,
gnu/javax/net/ssl/provider/SynchronizedRandom.java,
gnu/javax/net/ssl/provider/TLSHMac.java,
gnu/javax/net/ssl/provider/TLSRandom.java,
gnu/javax/net/ssl/provider/Util.java,
gnu/javax/net/ssl/provider/X509KeyManagerFactory.java,
gnu/javax/net/ssl/provider/X509TrustManagerFactory.java,
gnu/javax/net/ssl/provider/XMLSessionContext.java,
gnu/javax/security/auth/Password.java,
gnu/javax/security/auth/callback/AWTCallbackHandler.java,
gnu/javax/security/auth/callback/AbstractCallbackHandler.java,
gnu/javax/security/auth/callback/ConsoleCallbackHandler.java,
gnu/javax/security/auth/callback/DefaultCallbackHandler.java,
gnu/javax/security/auth/callback/GnuCallbacks.java,
gnu/javax/security/auth/callback/SwingCallbackHandler.java,
gnu/java/security/Registry.java,
gnu/java/security/Properties.java,
gnu/java/security/hash/BaseHash.java,
gnu/java/security/hash/HashFactory.java,
gnu/java/security/hash/Haval.java,
gnu/java/security/hash/IMessageDigest.java,
gnu/java/security/hash/MD2.java,
gnu/java/security/hash/MD4.java,
gnu/java/security/hash/MD5.java,
gnu/java/security/hash/RipeMD128.java,
gnu/java/security/hash/RipeMD160.java,
gnu/java/security/hash/Sha160.java,
gnu/java/security/hash/Sha256.java,
gnu/java/security/hash/Sha384.java,
gnu/java/security/hash/Sha512.java,
gnu/java/security/hash/Tiger.java,
gnu/java/security/hash/Whirlpool.java,
gnu/java/security/jce/hash/HavalSpi.java,
gnu/java/security/jce/hash/MD2Spi.java,
gnu/java/security/jce/hash/MD4Spi.java,
gnu/java/security/jce/hash/MD5Spi.java,
gnu/java/security/jce/hash/MessageDigestAdapter.java,
gnu/java/security/jce/hash/RipeMD128Spi.java,
gnu/java/security/jce/hash/RipeMD160Spi.java,
gnu/java/security/jce/hash/Sha160Spi.java,
gnu/java/security/jce/hash/Sha256Spi.java,
gnu/java/security/jce/hash/Sha384Spi.java,
gnu/java/security/jce/hash/Sha512Spi.java,
gnu/java/security/jce/hash/TigerSpi.java,
gnu/java/security/jce/hash/WhirlpoolSpi.java,
gnu/java/security/jce/prng/HavalRandomSpi.java,
gnu/java/security/jce/prng/MD2RandomSpi.java,
gnu/java/security/jce/prng/MD4RandomSpi.java,
gnu/java/security/jce/prng/MD5RandomSpi.java,
gnu/java/security/jce/prng/RipeMD128RandomSpi.java,
gnu/java/security/jce/prng/RipeMD160RandomSpi.java,
gnu/java/security/jce/prng/SecureRandomAdapter.java,
gnu/java/security/jce/prng/Sha160RandomSpi.java,
gnu/java/security/jce/prng/Sha256RandomSpi.java,
gnu/java/security/jce/prng/Sha384RandomSpi.java,
gnu/java/security/jce/prng/Sha512RandomSpi.java,
gnu/java/security/jce/prng/TigerRandomSpi.java,
gnu/java/security/jce/prng/WhirlpoolRandomSpi.java,
gnu/java/security/jce/sig/DSSKeyPairGeneratorSpi.java,
gnu/java/security/jce/sig/DSSRawSignatureSpi.java,
gnu/java/security/jce/sig/KeyPairGeneratorAdapter.java,
gnu/java/security/jce/sig/RSAKeyPairGeneratorSpi.java,
gnu/java/security/jce/sig/RSAPSSRawSignatureSpi.java,
gnu/java/security/jce/sig/SignatureAdapter.java,
gnu/java/security/key/IKeyPairCodec.java,
gnu/java/security/key/IKeyPairGenerator.java,
gnu/java/security/key/KeyPairCodecFactory.java,
gnu/java/security/key/KeyPairGeneratorFactory.java,
gnu/java/security/key/dss/DSSKey.java,
gnu/java/security/key/dss/DSSKeyPairGenerator.java,
gnu/java/security/key/dss/DSSKeyPairRawCodec.java,
gnu/java/security/key/dss/DSSPrivateKey.java,
gnu/java/security/key/dss/DSSPublicKey.java,
gnu/java/security/key/dss/FIPS186.java,
gnu/java/security/key/rsa/GnuRSAKey.java,
gnu/java/security/key/rsa/GnuRSAPrivateKey.java,
gnu/java/security/key/rsa/GnuRSAPublicKey.java,
gnu/java/security/key/rsa/RSAKeyPairGenerator.java,
gnu/java/security/key/rsa/RSAKeyPairRawCodec.java,
gnu/java/security/prng/BasePRNG.java,
gnu/java/security/prng/EntropySource.java,
gnu/java/security/prng/IRandom.java,
gnu/java/security/prng/LimitReachedException.java,
gnu/java/security/prng/MDGenerator.java,
gnu/java/security/prng/PRNGFactory.java,
gnu/java/security/prng/RandomEvent.java,
gnu/java/security/prng/RandomEventListener.java,
gnu/java/security/sig/BaseSignature.java,
gnu/java/security/sig/ISignature.java,
gnu/java/security/sig/ISignatureCodec.java,
gnu/java/security/sig/SignatureFactory.java,
gnu/java/security/sig/dss/DSSSignature.java,
gnu/java/security/sig/dss/DSSSignatureRawCodec.java,
gnu/java/security/sig/rsa/EME_PKCS1_V1_5.java,
gnu/java/security/sig/rsa/EMSA_PKCS1_V1_5.java,
gnu/java/security/sig/rsa/EMSA_PSS.java,
gnu/java/security/sig/rsa/RSA.java,
gnu/java/security/sig/rsa/RSAPKCS1V1_5Signature.java,
gnu/java/security/sig/rsa/RSAPSSSignature.java,
gnu/java/security/sig/rsa/RSAPSSSignatureRawCodec.java,
gnu/java/security/util/Base64.java,
gnu/java/security/util/ExpirableObject.java,
gnu/java/security/util/Prime2.java,
gnu/java/security/util/Sequence.java,
gnu/java/security/util/SimpleList.java,
gnu/java/security/util/Util.java,
resource/gnu/javax/security/auth/callback/MessagesBundle.properties:
new files imported from GNU Crypto and Jessie.
Diffstat (limited to 'gnu/javax/crypto/cipher/CipherFactory.java')
-rw-r--r-- | gnu/javax/crypto/cipher/CipherFactory.java | 169 |
1 files changed, 169 insertions, 0 deletions
diff --git a/gnu/javax/crypto/cipher/CipherFactory.java b/gnu/javax/crypto/cipher/CipherFactory.java new file mode 100644 index 000000000..082bfb8fa --- /dev/null +++ b/gnu/javax/crypto/cipher/CipherFactory.java @@ -0,0 +1,169 @@ +/* CipherFactory.java -- + Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc. + +This file is a part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 +USA + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + + +package gnu.javax.crypto.cipher; + +import gnu.java.security.Registry; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +/** + * <p>A <i>Factory</i> to instantiate symmetric block cipher instances.</p> + */ +public class CipherFactory implements Registry +{ + + // Constants and variables + // ------------------------------------------------------------------------- + + // Constructor(s) + // ------------------------------------------------------------------------- + + /** Trivial constructor to enforce Singleton pattern. */ + private CipherFactory() + { + super(); + } + + // Class methods + // ------------------------------------------------------------------------- + + /** + * <p>Returns an instance of a block cipher given its name.</p> + * + * @param name the case-insensitive name of the symmetric-key block cipher + * algorithm. + * @return an instance of the designated cipher algorithm, or + * <code>null</code> if none is found. + * @exception InternalError if the implementation does not pass its + * self-test. + */ + public static final IBlockCipher getInstance(String name) + { + if (name == null) + { + return null; + } + + name = name.trim(); + IBlockCipher result = null; + if (name.equalsIgnoreCase(ANUBIS_CIPHER)) + { + result = new Anubis(); + } + else if (name.equalsIgnoreCase(BLOWFISH_CIPHER)) + { + result = new Blowfish(); + } + else if (name.equalsIgnoreCase(DES_CIPHER)) + { + result = new DES(); + } + else if (name.equalsIgnoreCase(KHAZAD_CIPHER)) + { + result = new Khazad(); + } + else if (name.equalsIgnoreCase(RIJNDAEL_CIPHER) + || name.equalsIgnoreCase(AES_CIPHER)) + { + result = new Rijndael(); + } + else if (name.equalsIgnoreCase(SERPENT_CIPHER)) + { + result = new Serpent(); + } + else if (name.equalsIgnoreCase(SQUARE_CIPHER)) + { + result = new Square(); + } + else if (name.equalsIgnoreCase(TRIPLEDES_CIPHER) + || name.equalsIgnoreCase(DESEDE_CIPHER)) + { + result = new TripleDES(); + } + else if (name.equalsIgnoreCase(TWOFISH_CIPHER)) + { + result = new Twofish(); + } + else if (name.equalsIgnoreCase(CAST5_CIPHER) + || (name.equalsIgnoreCase(CAST128_CIPHER) || (name.equalsIgnoreCase(CAST_128_CIPHER)))) + { + result = new Cast5(); + } + else if (name.equalsIgnoreCase(NULL_CIPHER)) + { + result = new NullCipher(); + } + + if (result != null && !result.selfTest()) + { + throw new InternalError(result.name()); + } + + return result; + } + + /** + * <p>Returns a {@link Set} of symmetric key block cipher implementation + * names supported by this <i>Factory</i>.</p> + * + * @return a {@link Set} of block cipher names (Strings). + */ + public static final Set getNames() + { + HashSet hs = new HashSet(); + hs.add(ANUBIS_CIPHER); + hs.add(BLOWFISH_CIPHER); + hs.add(DES_CIPHER); + hs.add(KHAZAD_CIPHER); + hs.add(RIJNDAEL_CIPHER); + hs.add(SERPENT_CIPHER); + hs.add(SQUARE_CIPHER); + hs.add(TRIPLEDES_CIPHER); + hs.add(TWOFISH_CIPHER); + hs.add(CAST5_CIPHER); + hs.add(NULL_CIPHER); + + return Collections.unmodifiableSet(hs); + } + + // Instance methods + // ------------------------------------------------------------------------- +}
\ No newline at end of file |