Class APDU

Object
   |
   +--APDU

class APDU


Class implementing support for command and response APDUs
Defined in apdu.js


Field Summary
 Object cdata
          
 Object cla
          
 Object ins
          
 Object ne
          
 Object p1
          
 Object p2
          
 Object rapdu
          
 Object SW
          
<static>  Object INS_ACTIVATE
          
<static>  Object INS_CHANGE_REFERENCE_DATA
          
<static>  Object INS_COMPUTE_DIGITAL_SIGN
          
<static>  Object INS_DEACTIVATE
          
<static>  Object INS_EXTERNAL_AUTHENTICATE
          
<static>  Object INS_GENERAL_AUTHENTICATE
          
<static>  Object INS_GENERATE_KEY_PAIR
          
<static>  Object INS_GET_CHALLENGE
          
<static>  Object INS_MANAGE_SE
          
<static>  Object INS_PSO
          
<static>  Object INS_READ_BINARY
          
<static>  Object INS_READ_RECORD
          
<static>  Object INS_READBINARY
          
<static>  Object INS_RESET_RETRY_COUNTER
          
<static>  Object INS_SELECT
          
<static>  Object INS_TERMINATE
          
<static>  Object INS_UPDATE_BINARY
          
<static>  Object INS_VERIFY
          
<static>  Object INS_VERIFY_CERTIFICATE
          
<static>  Object SW_ACNOTSATISFIED
          
<static>  Object SW_AUTHMETHLOCKED
          
<static>  Object SW_CHAINNOTSUPPORTED
          
<static>  Object SW_CLANOTSUPPORTED
          
<static>  Object SW_COMINCOMPATIBLE
          
<static>  Object SW_COMNOTALLOWED
          
<static>  Object SW_COMNOTALLOWNOEF
          
<static>  Object SW_CONDOFUSENOTSAT
          
<static>  Object SW_DATAINV
          
<static>  Object SW_DFNAMEEXISTS
          
<static>  Object SW_EOF
          
<static>  Object SW_EXECERR
          
<static>  Object SW_FILEEXISTS
          
<static>  Object SW_FILENOTFOUND
          
<static>  Object SW_FUNCNOTSUPPORTED
          
<static>  Object SW_GENERALERROR
          
<static>  Object SW_INCP1P2
          
<static>  Object SW_INCSMDATAOBJECT
          
<static>  Object SW_INVACC
          
<static>  Object SW_INVCLA
          
<static>  Object SW_INVDATA
          
<static>  Object SW_INVFILE
          
<static>  Object SW_INVFORMAT
          
<static>  Object SW_INVINS
          
<static>  Object SW_INVLC
          
<static>  Object SW_INVLCTLV
          
<static>  Object SW_INVLE
          
<static>  Object SW_INVP1P2
          
<static>  Object SW_INVPARA
          
<static>  Object SW_LASTCMDEXPECTED
          
<static>  Object SW_LCNOTSUPPORTED
          
<static>  Object SW_MEMERR
          
<static>  Object SW_MEMERRWRITE
          
<static>  Object SW_NOAPPL
          
<static>  Object SW_NOMORESTORAGE
          
<static>  Object SW_OK
          
<static>  Object SW_OKMOREDATA
          
<static>  Object SW_OUTOFMEMORY
          
<static>  Object SW_RDNOTFOUND
          
<static>  Object SW_RECORDNOTFOUND
          
<static>  Object SW_REFDATANOTUSABLE
          
<static>  Object SW_SECSTATNOTSAT
          
<static>  Object SW_SMNOTSUPPORTED
          
<static>  Object SW_SMOBJMISSING
          
<static>  Object SW_TIMEOUT
          
<static>  Object SW_WARNING
          
<static>  Object SW_WARNING0LEFT
          
<static>  Object SW_WARNING1
          
<static>  Object SW_WARNING1LEFT
          
<static>  Object SW_WARNING2LEFT
          
<static>  Object SW_WARNING3LEFT
          
<static>  Object SW_WARNINGCOUNT
          
<static>  Object SW_WARNINGNVCHG
          
<static>  Object SW_WRONGLENGTH
          
 
Constructor Summary
APDU()
            Create an APDU

This constructor supports the signatures

  • APDU(ByteString command)
  • APDU(Number cla, Number ins, Number p1, Number p2)
  • APDU(Number cla, Number ins, Number p1, Number p2, data)
  • APDU(Number cla, Number ins, Number p1, Number p2, data, Ne)
 
Method Summary
 void fromByteString(<ByteString> bs)
           Create an APDU object from the encoded form (Called internally)
 ByteString getCData()
           Gets the command data
 TLVList getCDataAsTLVList()
           Gets the command data as a list of TLV objects
 Number getCLA()
           Gets the class byte
 ByteString getCommandAPDU()
           Get encoded command APDU
 Number getINS()
           Gets the instruction byte
 Number getNe()
           Gets the number of expected bytes
 Number getP1()
           Gets the P1 byte
 Number getP2()
           Gets the P2 byte
 ByteString getRData()
           Get the response data
 ByteString getResponseAPDU()
           Get encoded response APDU
 SecureChannel getSecureChannel()
           Return the secure channel, if any
 Number getSW()
           Get the status word
 boolean hasCData()
           Check if APDU has command data
 boolean hasLe()
           Check if APDU has Le field
 boolean hasRData()
           Check if APDU has response data
 boolean hasSecureChannel()
           Test if a secure channel is defined for this APDU
 boolean isAuthenticatedHeader()
           Test if command is send using secure messaging
 boolean isChained()
           Test if command chaining is indicated
 boolean isISO()
           Test if command is an ISO command
 boolean isSecureMessaging()
           Test if command is send using secure messaging
 void setCData(<ByteString> cdata)
           Set the command data
 void setRData(<ByteString> data)
           Sets the response data field for the response APDU
 void setSecureChannel(<SecureChannel> secureChannel)
           Set secure channel object to be used in wrap and unwrap methods
 void setSW(<Number> sw)
           Sets the status word for the response ADPU
 Object toString()
           Return a human readable form of this object
 void unwrap()
           Unwrap APDU using secure channel
 void wrap()
           Wrap APDU using secure channel
<static> void test()
           Simple unit test

Field Detail

cdata

Object cdata

cla

Object cla

ins

Object ins

ne

Object ne

p1

Object p1

p2

Object p2

rapdu

Object rapdu

SW

Object SW

INS_ACTIVATE

<static> Object INS_ACTIVATE

INS_CHANGE_REFERENCE_DATA

<static> Object INS_CHANGE_REFERENCE_DATA

INS_COMPUTE_DIGITAL_SIGN

<static> Object INS_COMPUTE_DIGITAL_SIGN

INS_DEACTIVATE

<static> Object INS_DEACTIVATE

INS_EXTERNAL_AUTHENTICATE

<static> Object INS_EXTERNAL_AUTHENTICATE

INS_GENERAL_AUTHENTICATE

<static> Object INS_GENERAL_AUTHENTICATE

INS_GENERATE_KEY_PAIR

<static> Object INS_GENERATE_KEY_PAIR

INS_GET_CHALLENGE

<static> Object INS_GET_CHALLENGE

INS_MANAGE_SE

<static> Object INS_MANAGE_SE

INS_PSO

<static> Object INS_PSO

INS_READ_BINARY

<static> Object INS_READ_BINARY

INS_READ_RECORD

<static> Object INS_READ_RECORD

INS_READBINARY

<static> Object INS_READBINARY

INS_RESET_RETRY_COUNTER

<static> Object INS_RESET_RETRY_COUNTER

INS_SELECT

<static> Object INS_SELECT

INS_TERMINATE

<static> Object INS_TERMINATE

INS_UPDATE_BINARY

<static> Object INS_UPDATE_BINARY

INS_VERIFY

<static> Object INS_VERIFY

INS_VERIFY_CERTIFICATE

<static> Object INS_VERIFY_CERTIFICATE

SW_ACNOTSATISFIED

<static> Object SW_ACNOTSATISFIED

SW_AUTHMETHLOCKED

<static> Object SW_AUTHMETHLOCKED

SW_CHAINNOTSUPPORTED

<static> Object SW_CHAINNOTSUPPORTED

SW_CLANOTSUPPORTED

<static> Object SW_CLANOTSUPPORTED

SW_COMINCOMPATIBLE

<static> Object SW_COMINCOMPATIBLE

SW_COMNOTALLOWED

<static> Object SW_COMNOTALLOWED

SW_COMNOTALLOWNOEF

<static> Object SW_COMNOTALLOWNOEF

SW_CONDOFUSENOTSAT

<static> Object SW_CONDOFUSENOTSAT

SW_DATAINV

<static> Object SW_DATAINV

SW_DFNAMEEXISTS

<static> Object SW_DFNAMEEXISTS

SW_EOF

<static> Object SW_EOF

SW_EXECERR

<static> Object SW_EXECERR

SW_FILEEXISTS

<static> Object SW_FILEEXISTS

SW_FILENOTFOUND

<static> Object SW_FILENOTFOUND

SW_FUNCNOTSUPPORTED

<static> Object SW_FUNCNOTSUPPORTED

SW_GENERALERROR

<static> Object SW_GENERALERROR

SW_INCP1P2

<static> Object SW_INCP1P2

SW_INCSMDATAOBJECT

<static> Object SW_INCSMDATAOBJECT

SW_INVACC

<static> Object SW_INVACC

SW_INVCLA

<static> Object SW_INVCLA

SW_INVDATA

<static> Object SW_INVDATA

SW_INVFILE

<static> Object SW_INVFILE

SW_INVFORMAT

<static> Object SW_INVFORMAT

SW_INVINS

<static> Object SW_INVINS

SW_INVLC

<static> Object SW_INVLC

SW_INVLCTLV

<static> Object SW_INVLCTLV

SW_INVLE

<static> Object SW_INVLE

SW_INVP1P2

<static> Object SW_INVP1P2

SW_INVPARA

<static> Object SW_INVPARA

SW_LASTCMDEXPECTED

<static> Object SW_LASTCMDEXPECTED

SW_LCNOTSUPPORTED

<static> Object SW_LCNOTSUPPORTED

SW_MEMERR

<static> Object SW_MEMERR

SW_MEMERRWRITE

<static> Object SW_MEMERRWRITE

SW_NOAPPL

<static> Object SW_NOAPPL

SW_NOMORESTORAGE

<static> Object SW_NOMORESTORAGE

SW_OK

<static> Object SW_OK

SW_OKMOREDATA

<static> Object SW_OKMOREDATA

SW_OUTOFMEMORY

<static> Object SW_OUTOFMEMORY

SW_RDNOTFOUND

<static> Object SW_RDNOTFOUND

SW_RECORDNOTFOUND

<static> Object SW_RECORDNOTFOUND

SW_REFDATANOTUSABLE

<static> Object SW_REFDATANOTUSABLE

SW_SECSTATNOTSAT

<static> Object SW_SECSTATNOTSAT

SW_SMNOTSUPPORTED

<static> Object SW_SMNOTSUPPORTED

SW_SMOBJMISSING

<static> Object SW_SMOBJMISSING

SW_TIMEOUT

<static> Object SW_TIMEOUT

SW_WARNING

<static> Object SW_WARNING

SW_WARNING0LEFT

<static> Object SW_WARNING0LEFT

SW_WARNING1

<static> Object SW_WARNING1

SW_WARNING1LEFT

<static> Object SW_WARNING1LEFT

SW_WARNING2LEFT

<static> Object SW_WARNING2LEFT

SW_WARNING3LEFT

<static> Object SW_WARNING3LEFT

SW_WARNINGCOUNT

<static> Object SW_WARNINGCOUNT

SW_WARNINGNVCHG

<static> Object SW_WARNINGNVCHG

SW_WRONGLENGTH

<static> Object SW_WRONGLENGTH

Constructor Detail

APDU

APDU()

Method Detail

fromByteString

void fromByteString(<ByteString> bs)

getCData

ByteString getCData()

getCDataAsTLVList

TLVList getCDataAsTLVList()

getCLA

Number getCLA()

getCommandAPDU

ByteString getCommandAPDU()

getINS

Number getINS()

getNe

Number getNe()

getP1

Number getP1()

getP2

Number getP2()

getRData

ByteString getRData()

getResponseAPDU

ByteString getResponseAPDU()

getSecureChannel

SecureChannel getSecureChannel()

getSW

Number getSW()

hasCData

boolean hasCData()

hasLe

boolean hasLe()

hasRData

boolean hasRData()

hasSecureChannel

boolean hasSecureChannel()

isAuthenticatedHeader

boolean isAuthenticatedHeader()

isChained

boolean isChained()

isISO

boolean isISO()

isSecureMessaging

boolean isSecureMessaging()

setCData

void setCData(<ByteString> cdata)

setRData

void setRData(<ByteString> data)

setSecureChannel

void setSecureChannel(<SecureChannel> secureChannel)

setSW

void setSW(<Number> sw)

toString

Object toString()

unwrap

void unwrap()

wrap

void wrap()

test

<static> void test()


Documentation generated by JSDoc on Tue Sep 3 22:29:41 2013