opencard.opt.database
Class SecurityAttribute

java.lang.Object
  extended by opencard.opt.database.SecurityAttribute

public class SecurityAttribute
extends java.lang.Object

A SecurityAttribute is a wrapper for a byte array that holds a security attribute (DO, or Data Object) to be passed as parameter to some functions of a DatabaseCardService (such as createTable, createView, or presentUser). Note that the ISO7816-7 standard does not specify what information should be provided and in what form. This is up to proprietary sub-classes to add semantics to this raw data.

Important Note: as when security attributes are specified in a Command APDU, it is always in the form of: 'Lp ' (see the ISO7816-7 standard) where 'Lp' is the Parameter length and 'DO' (Data Object) the actual byte array, the getBytes method of SecurityAttribute is returning the security information in this form (i.e., with the data length added as one byte at the beginning of the returned byte array.

Since:
OCF1.2
Version:
$Id: SecurityAttribute.java,v 1.1 1999/12/06 15:46:06 damke Exp $
Author:
Arnaud HAMEL, Cedric DANGREMONT, Christophe.Muller@research.gemplus.com
See Also:
DatabaseCardService.createTable(java.lang.String, java.lang.String, byte, opencard.opt.database.SecurityAttribute), DatabaseCardService.createView(java.lang.String, java.lang.String, java.lang.String, java.lang.String, opencard.opt.database.SecurityAttribute), DatabaseCardService.presentUser(java.lang.String, opencard.opt.database.SecurityAttribute)

Constructor Summary
SecurityAttribute(byte[] dObj)
           
SecurityAttribute(java.lang.String password)
           
 
Method Summary
 byte[] getBytes()
          Copies the byte values from this object data into the destination byte array.
 byte getDataLength()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityAttribute

public SecurityAttribute(byte[] dObj)

SecurityAttribute

public SecurityAttribute(java.lang.String password)
Method Detail

getBytes

public byte[] getBytes()
Copies the byte values from this object data into the destination byte array. In the first element of the returned array, the length of the data is inserted, thus the returned array is suitable to be directly included into an APDU command.

Returns:
The resultant byte array

getDataLength

public byte getDataLength()