FileDocCategorySizeDatePackage
ID3Encryption.javaAPI Docjid3 0.463106Sun Feb 06 18:11:26 GMT 2005org.blinkenlights.jid3.crypt

ID3Encryption

public class ID3Encryption extends Object
author
paul

Fields Summary
private static ID3Encryption
s_oInstance
private Map
m_oOwnerIdentifierToCryptoAgentMap
Constructors Summary
private ID3Encryption()
Creates a new instance of ID3Encryption

        m_oOwnerIdentifierToCryptoAgentMap = new HashMap();
    
Methods Summary
public ICryptoAgentderegisterCryptoAgent(java.lang.String sOwnerIdentifier)
Deregister a crypto agent.

param
sOwnerIdentifier the owner identifier string uniquely identifying the crypto agent to be deregistered
return
the previously registered agent if there is a match, or null otherwise

        return (ICryptoAgent)m_oOwnerIdentifierToCryptoAgentMap.remove(sOwnerIdentifier);
    
public static org.blinkenlights.jid3.crypt.ID3EncryptiongetInstance()
Get the single instance of the ID3Encryption registrar.

return
the ID3Encryption instance

        synchronized(ID3Encryption.class)
        {
            if (s_oInstance == null)
            {
                s_oInstance = new ID3Encryption();
            }
        }
        
        return s_oInstance;
    
public ICryptoAgentlookupCryptoAgent(java.lang.String sOwnerIdentifier)
Look up a registered crypto agent.

param
sOwnerIdentifier the owner identifier string uniquely identifying the crypto agent to be returned
return
the registered agent if there is a match, or null otherwise

        return (ICryptoAgent)m_oOwnerIdentifierToCryptoAgentMap.get(sOwnerIdentifier);
    
public voidregisterCryptoAgent(ICryptoAgent oCryptoAgent)
Register a crypto agent. This is the means by which support for encryption algorithms are added. An encryption method must be registered before it can be used to encrypt or decrypt an encrypted ID3V2 frame.

param
oCryptoAgent the crypto agent to be registered

        m_oOwnerIdentifierToCryptoAgentMap.put(oCryptoAgent.getOwnerIdentifier(), oCryptoAgent);