Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.javax.crypto.keyring
Class AuthenticatedEntry  view AuthenticatedEntry download AuthenticatedEntry.java

java.lang.Object
  extended bygnu.javax.crypto.keyring.Entry
      extended bygnu.javax.crypto.keyring.EnvelopeEntry
          extended bygnu.javax.crypto.keyring.MaskableEnvelopeEntry
              extended bygnu.javax.crypto.keyring.AuthenticatedEntry
All Implemented Interfaces:
gnu.java.security.Registry

public final class AuthenticatedEntry
extends MaskableEnvelopeEntry
implements gnu.java.security.Registry


Field Summary
static int TYPE
           
 
Fields inherited from class gnu.javax.crypto.keyring.MaskableEnvelopeEntry
masked
 
Fields inherited from class gnu.javax.crypto.keyring.EnvelopeEntry
containingEnvelope, entries
 
Fields inherited from class gnu.javax.crypto.keyring.Entry
payload, properties, type
 
Fields inherited from interface gnu.java.security.Registry
AES_CIPHER, ANUBIS_CIPHER, ARCFOUR_PRNG, ASN1_ENCODING, ASN1_ENCODING_ID, ASN1_ENCODING_SHORT_NAME, BLOWFISH_CIPHER, CAST_128_CIPHER, CAST128_CIPHER, CAST5_CIPHER, CBC_MODE, CFB_MODE, CSPRNG_PRNG, CTR_MODE, DES_CIPHER, DESEDE_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, KHAZAD_CIPHER, 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, MD_PRNG, MD2_HASH, MD4_HASH, MD5_HASH, 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, RIPEMD_128_HASH, RIPEMD_160_HASH, RIPEMD128_HASH, RIPEMD160_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_AUTH_INFO_PROVIDER_PKGS, SASL_AUTHORISATION_ID, 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, SHA_1_HASH, SHA_HASH, SHA1_HASH, SHA160_HASH, SHA256_HASH, SHA384_HASH, SHA512_HASH, SQUARE_CIPHER, SRP_KPG, SRP_SASL_KA, SRP_TLS_KA, SRP6_KA, SSL3_PAD, STRENGTH_HIGH, STRENGTH_LOW, STRENGTH_MEDIUM, TBC_PAD, TIGER_HASH, TLS1_PAD, TMMH16, TRIPLEDES_CIPHER, TWOFISH_CIPHER, UHASH32, UMAC_PRNG, UMAC32, VERSION_STRING, WHIRLPOOL_HASH, X509_ENCODING, X509_ENCODING_ID, X509_ENCODING_SORT_NAME
 
Constructor Summary
private AuthenticatedEntry()
           
  AuthenticatedEntry(java.lang.String mac, int macLen, Properties properties)
           
 
Method Summary
 void authenticate(byte[] key)
          Computes the mac over this envelope's data.
static AuthenticatedEntry decode(java.io.DataInputStream in)
           
protected  void encodePayload()
          This method is called of subclasses when the payload data needs to be created.
private  gnu.javax.crypto.mac.IMac getMac(byte[] key)
           
 void verify(byte[] key)
          Verifies this entry's payload.
 
Methods inherited from class gnu.javax.crypto.keyring.MaskableEnvelopeEntry
add, containsEntry, get, getEntries, isMasked, remove, remove, setMasked
 
Methods inherited from class gnu.javax.crypto.keyring.EnvelopeEntry
containsAlias, decodeEnvelope, getAliasList, setContainingEnvelope
 
Methods inherited from class gnu.javax.crypto.keyring.Entry
defaultDecode, encode, getPayload, getProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final int TYPE
See Also:
Constant Field Values
Constructor Detail

AuthenticatedEntry

public AuthenticatedEntry(java.lang.String mac,
                          int macLen,
                          Properties properties)

AuthenticatedEntry

private AuthenticatedEntry()
Method Detail

decode

public static AuthenticatedEntry decode(java.io.DataInputStream in)
                                 throws java.io.IOException

authenticate

public void authenticate(byte[] key)
                  throws java.io.IOException,
                         java.security.InvalidKeyException
Computes the mac over this envelope's data. This method must be called before this entry in encoded.


verify

public void verify(byte[] key)
            throws java.security.InvalidKeyException
Verifies this entry's payload. This method will unmask this entry, thus it must be called before accessing its contents.


encodePayload

protected void encodePayload()
                      throws java.io.IOException
Description copied from class: Entry
This method is called of subclasses when the payload data needs to be created.

Overrides:
encodePayload in class EnvelopeEntry

getMac

private gnu.javax.crypto.mac.IMac getMac(byte[] key)
                                  throws java.security.InvalidKeyException