XCMS Toolkit

examples
Class ExampleSecretKeyLookup

java.lang.Object
  extended by examples.ExampleSecretKeyLookup
All Implemented Interfaces:
SecretKeyLookup

public class ExampleSecretKeyLookup
extends java.lang.Object
implements SecretKeyLookup

A simple SecretKeyLookup that returns the same key each time lookup() is called. All of the provided arguments in the call to this implementation are ignored. The purpose of this class is to simulate a secret key lookup for use by toolkit examples.

Version:
1.00 - 2006/02/22
Author:
support@phillipgriffin.com

Constructor Summary
ExampleSecretKeyLookup(javax.crypto.SecretKey key)
          Constructor for ExampleSecretKeyLookup that specifies the SecretKey to return from the lookup() method.
 
Method Summary
 javax.crypto.SecretKey lookup(byte[] keyName, ContentEncryptionAlgorithmIdentifier algorithm)
          Simply returns the current secret cryptographic key, ignoring all of the provided lookup() parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleSecretKeyLookup

public ExampleSecretKeyLookup(javax.crypto.SecretKey key)
Constructor for ExampleSecretKeyLookup that specifies the SecretKey to return from the lookup() method.

Parameters:
key - a secret cryptographic key to establish for future lookup
Method Detail

lookup

public javax.crypto.SecretKey lookup(byte[] keyName,
                                     ContentEncryptionAlgorithmIdentifier algorithm)
Simply returns the current secret cryptographic key, ignoring all of the provided lookup() parameters.

Specified by:
lookup in interface SecretKeyLookup
Parameters:
keyName - the local name of a Content Encryption Key (CEK)
algorithm - a content encryption algoithm identifier, a value of ASN.1 type ContentEncryptionAlgorithmIdentifier

XCMS Toolkit


Copyright © 2005-2006 GRIFFIN Consulting. All Rights Reserved.