gnu.javax.crypto.mac

Class MacFactory

Implemented Interfaces:
Registry

public class MacFactory
extends Object
implements Registry

A Factory that instantiates instances of every supported Message Authentication Code algorithms, including all HMAC algorithms.

Fields inherited from interface gnu.java.security.Registry

AES128_KWA, AES192_KWA, AES256_KWA, AES_CIPHER, AES_KWA, ANUBIS_CIPHER, ARCFOUR_PRNG, ASN1_ENCODING, ASN1_ENCODING_ID, ASN1_ENCODING_SHORT_NAME, BLOWFISH_CIPHER, CAST128_CIPHER, CAST5_CIPHER, CAST_128_CIPHER, CBC_MODE, CFB_MODE, CSPRNG_PRNG, CTR_MODE, DESEDE_CIPHER, DESEDE_KWA, DES_CIPHER, DH_KA, DH_KPG, DH_OID_STRING, DSA_KPG, DSA_OID_STRING, DSA_SIG, DSS_KPG, DSS_SIG, EAX_MODE, ECB_MODE, ELGAMAL_KA, EME_PKCS1_V1_5_PAD, FORTUNA_GENERATOR_PRNG, FORTUNA_PRNG, GKR_CERTIFICATES, GKR_CIPHER_AES_128_CBC, GKR_CIPHER_AES_128_OFB, GKR_HMAC_MD5_128, GKR_HMAC_MD5_96, GKR_HMAC_SHA_160, GKR_HMAC_SHA_96, GKR_MAGIC, GKR_PRIVATE_KEYS, GKR_PUBLIC_CREDENTIALS, GNU_CRYPTO, GNU_SASL, GNU_SECURITY, HAVAL_HASH, HMAC_NAME_PREFIX, ICM_MODE, ICM_PRNG, ISO10126_PAD, KHAZAD_CIPHER, KWA_PREFIX, MAGIC_RAW_DH_PRIVATE_KEY, MAGIC_RAW_DH_PUBLIC_KEY, MAGIC_RAW_DSS_PRIVATE_KEY, MAGIC_RAW_DSS_PUBLIC_KEY, MAGIC_RAW_DSS_SIGNATURE, MAGIC_RAW_RSA_PKCS1V1_5_SIGNATURE, MAGIC_RAW_RSA_PRIVATE_KEY, MAGIC_RAW_RSA_PSS_SIGNATURE, MAGIC_RAW_RSA_PUBLIC_KEY, MAGIC_RAW_SRP_PRIVATE_KEY, MAGIC_RAW_SRP_PUBLIC_KEY, MD2_HASH, MD4_HASH, MD5_HASH, MD_PRNG, NULL_CIPHER, OFB_MODE, OMAC_PREFIX, PBKDF2_PRNG_PREFIX, PKCS5_PAD, PKCS7_PAD, PKCS8_ENCODING, PKCS8_ENCODING_ID, PKCS8_ENCODING_SHORT_NAME, QOP_AUTH, QOP_AUTH_CONF, QOP_AUTH_INT, RAW_ENCODING, RAW_ENCODING_ID, RAW_ENCODING_SHORT_NAME, RC4_PRNG, REUSE_FALSE, REUSE_TRUE, RIJNDAEL_CIPHER, RIJNDAEL_KWA, RIPEMD128_HASH, RIPEMD160_HASH, RIPEMD_128_HASH, RIPEMD_160_HASH, RSA_KPG, RSA_OID_STRING, RSA_PKCS1_V1_5_ENCODING, RSA_PKCS1_V1_5_SIG, RSA_PSS_ENCODING, RSA_PSS_SIG, RSA_SIG_PREFIX, SASL_ANONYMOUS_MECHANISM, SASL_AUTHORISATION_ID, SASL_AUTH_INFO_PROVIDER_PKGS, SASL_BUFFER_MAX_LIMIT, SASL_CALLBACK_HANDLER, SASL_CHANNEL_BINDING, SASL_CRAM_MD5_MECHANISM, SASL_FOUR_BYTE_MAX_LIMIT, SASL_HMAC_MD5_IALG, SASL_HMAC_SHA_IALG, SASL_ONE_BYTE_MAX_LIMIT, SASL_PASSWORD, SASL_PLAIN_MECHANISM, SASL_PREFIX, SASL_PROTOCOL, SASL_SERVER_NAME, SASL_SRP_MECHANISM, SASL_TWO_BYTE_MAX_LIMIT, SASL_USERNAME, SERPENT_CIPHER, SERVER_AUTH_FALSE, SERVER_AUTH_TRUE, SHA160_HASH, SHA1_HASH, SHA256_HASH, SHA384_HASH, SHA512_HASH, SHA_1_HASH, SHA_HASH, SQUARE_CIPHER, SRP6_KA, SRP_KPG, SRP_SASL_KA, SRP_TLS_KA, SSL3_PAD, STRENGTH_HIGH, STRENGTH_LOW, STRENGTH_MEDIUM, TBC_PAD, TIGER_HASH, TLS1_PAD, TMMH16, TRIPLEDES_CIPHER, TRIPLEDES_KWA, TWOFISH_CIPHER, UHASH32, UMAC32, UMAC_PRNG, VERSION_STRING, WHIRLPOOL_HASH, X509_ENCODING, X509_ENCODING_ID, X509_ENCODING_SORT_NAME

Method Summary

static IMac
getInstance(String name)
Returns an instance of a MAC algorithm given its name.
static Set<E>
getNames()
Returns a Set of names of MAC algorithms supported by this Factory.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

getInstance

public static IMac getInstance(String name)
Returns an instance of a MAC algorithm given its name.
Parameters:
name - the name of the MAC algorithm.
Returns:
an instance of the MAC algorithm, or null if none can be constructed.

getNames

public static final Set<E> getNames()
Returns a Set of names of MAC algorithms supported by this Factory.
Returns:
a Set of MAC names (Strings).

MacFactory.java -- Copyright (C) 2001, 2002, 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.