javacardx.crypto
Class XORCipher

java.lang.Object
  |
  +--javacardx.crypto.Cipher
        |
        +--javacardx.crypto.XORCipher

public class XORCipher
extends Cipher


Field Summary
private  byte[] key
           
private  short keyIndex
           
 
Fields inherited from class javacardx.crypto.Cipher
ALG_XOR, MODE_DECRYPT, MODE_ENCRYPT
 
Constructor Summary
XORCipher()
           
 
Method Summary
 short doFinal(byte[] inBuff, short inOffset, short inLength, byte[] outBuff, short outOffset)
           
 byte getAlgorithm()
           
 void init(Key theKey, byte theMode)
           
 void init(Key theKey, byte theMode, byte[] bArray, short bOff, short bLen)
           
 short update(byte[] inBuff, short inOffset, short inLength, byte[] outBuff, short outOffset)
           
 
Methods inherited from class javacardx.crypto.Cipher
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private byte[] key

keyIndex

private short keyIndex
Constructor Detail

XORCipher

public XORCipher()
Method Detail

init

public void init(Key theKey,
                 byte theMode)
          throws CryptoException
Specified by:
init in class Cipher
CryptoException

init

public void init(Key theKey,
                 byte theMode,
                 byte[] bArray,
                 short bOff,
                 short bLen)
          throws CryptoException
Specified by:
init in class Cipher
CryptoException

getAlgorithm

public byte getAlgorithm()
Specified by:
getAlgorithm in class Cipher

doFinal

public short doFinal(byte[] inBuff,
                     short inOffset,
                     short inLength,
                     byte[] outBuff,
                     short outOffset)
              throws CryptoException
Specified by:
doFinal in class Cipher
CryptoException

update

public short update(byte[] inBuff,
                    short inOffset,
                    short inLength,
                    byte[] outBuff,
                    short outOffset)
             throws CryptoException
Specified by:
update in class Cipher
CryptoException