com.safeidentity.common.crypto
Class SICryptPkg

java.lang.Object
  extended bycom.safeidentity.common.crypto.SICryptPkg

public class SICryptPkg
extends java.lang.Object

Author:
jkkang

Field Summary
static int E_HMAC_CAL_FAIL
           
static int E_HMAC_INCONSIST
           
static int E_HMAC_SUCCESS
           
static byte FLAG_REQUEST
           
static byte FLAG_RESPONSE
           
 
Constructor Summary
SICryptPkg()
           
 
Method Summary
 void checkProvider()
           
 byte[] decryptSITicket(int algid, byte[] keys, byte[] iv, byte[] encryptedTicket)
           
 byte[] encryptSITicket(int algid, byte[] keys, byte[] iv, byte[] plainTicket)
           
 int generateRandomSalt(byte[] salt)
           
 int getEncryptTimeStamp(byte[] encData)
           
static SICryptPkg getInstance()
           
 java.lang.String getSenderIdentifier(byte[] encData)
           
 int keyDerivation(byte[] salt, byte[] contentEncKey, byte[] macKey, byte[] iv, byte[] key)
          Returns status number of derived key.
 byte[] makeEncBlock(int algid, int macid, java.lang.String value, byte[] keys, byte flag, java.lang.String name)
           
 java.lang.String makePlainText(byte[] encData, byte[] keys, byte flag, int validTime)
           
 byte[] makeSITicketMAC(byte[] seed, int seedSize, byte[] ticket, int ticketSize, int macalg, byte[] macKey)
          Returns SITicket Mac.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E_HMAC_SUCCESS

public static final int E_HMAC_SUCCESS
See Also:
Constant Field Values

E_HMAC_CAL_FAIL

public static final int E_HMAC_CAL_FAIL
See Also:
Constant Field Values

E_HMAC_INCONSIST

public static final int E_HMAC_INCONSIST
See Also:
Constant Field Values

FLAG_REQUEST

public static final byte FLAG_REQUEST
See Also:
Constant Field Values

FLAG_RESPONSE

public static final byte FLAG_RESPONSE
See Also:
Constant Field Values
Constructor Detail

SICryptPkg

public SICryptPkg()
Method Detail

getInstance

public static SICryptPkg getInstance()

checkProvider

public void checkProvider()

makeEncBlock

public byte[] makeEncBlock(int algid,
                           int macid,
                           java.lang.String value,
                           byte[] keys,
                           byte flag,
                           java.lang.String name)
                    throws SICryptException
Throws:
SICryptException

getSenderIdentifier

public java.lang.String getSenderIdentifier(byte[] encData)
                                     throws SICryptException
Throws:
SICryptException

makePlainText

public java.lang.String makePlainText(byte[] encData,
                                      byte[] keys,
                                      byte flag,
                                      int validTime)
                               throws SICryptException
Throws:
SICryptException

decryptSITicket

public byte[] decryptSITicket(int algid,
                              byte[] keys,
                              byte[] iv,
                              byte[] encryptedTicket)
                       throws SICryptException
Throws:
SICryptException

encryptSITicket

public byte[] encryptSITicket(int algid,
                              byte[] keys,
                              byte[] iv,
                              byte[] plainTicket)
                       throws SICryptException
Throws:
SICryptException

makeSITicketMAC

public byte[] makeSITicketMAC(byte[] seed,
                              int seedSize,
                              byte[] ticket,
                              int ticketSize,
                              int macalg,
                              byte[] macKey)
                       throws SICryptException
Returns SITicket Mac.

Parameters:
seed -
seedSize -
ticket -
ticketSize -
macalg -
macKey -
Returns:
Throws:
SICryptException

keyDerivation

public int keyDerivation(byte[] salt,
                         byte[] contentEncKey,
                         byte[] macKey,
                         byte[] iv,
                         byte[] key)
Returns status number of derived key.

Parameters:
salt -
contentEncKey -
macKey -
iv -
key -
Returns:

generateRandomSalt

public int generateRandomSalt(byte[] salt)

getEncryptTimeStamp

public int getEncryptTimeStamp(byte[] encData)
                        throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2004 SoftForum Corp. All Rights Reserved.