org.blinkenlights.jid3.crypt
Interface ICryptoAgent

All Known Implementing Classes:
ID3V2Test.DummyCryptoAgent, ID3V2Test.ExpandCryptoAgent, ID3V2Test.ROTCryptoAgent

public interface ICryptoAgent


Method Summary
 byte[] decrypt(byte[] abyEncryptedData, byte[] abyEncryptionData)
          Decrypt an array of bytes.
 byte[] encrypt(byte[] abyRawData, byte[] abyEncryptionData)
          Encrypt an array of bytes.
 java.lang.String getOwnerIdentifier()
          Get the owner identifier for this encryption method.
 

Method Detail

getOwnerIdentifier

public java.lang.String getOwnerIdentifier()
Get the owner identifier for this encryption method. Each encrypted frame in a tag has its encryption method represented by a unique owner identifier. This value much match the owner identifier of a crypto agent to be used for decryption.

Returns:
a string containing the owner identifier

encrypt

public byte[] encrypt(byte[] abyRawData,
                      byte[] abyEncryptionData)
               throws ID3CryptException
Encrypt an array of bytes.

Parameters:
abyRawData - an array of bytes which are to be encrypted
abyEncryptionData - an array of bytes which are used to encrypt the raw data
Returns:
an array of encrypted bytes
Throws:
ID3CryptException

decrypt

public byte[] decrypt(byte[] abyEncryptedData,
                      byte[] abyEncryptionData)
               throws ID3CryptException
Decrypt an array of bytes.

Parameters:
abyEncryptedData - an array of encrypted bytes
abyEncryptionData - an array of bytes which are used to decrypt the encrypted data
Returns:
an array of unencrypted bytes
Throws:
ID3CryptException