com.vs.ezlicrun
Class PkCrypt

java.lang.Object
  extended by com.vs.ezlicrun.PkCrypt

public class PkCrypt
extends java.lang.Object

Public key encryption class. For internal use only.


Constructor Summary
PkCrypt()
           
 
Method Summary
static java.lang.String decryptWithPrivateKey(java.lang.String password, java.lang.String crypttext, java.lang.String privateKey)
          PRIVATE: FOR INTERNAL USE ONLY Decrypt specified encrypted text with a specified private key.
static java.lang.String decryptWithPublicKey(java.lang.String crypttext, java.lang.String publicKey)
          Decrypt specified encrypted text with a specified public key.
static java.lang.String encryptWithPrivateKey(java.lang.String password, java.lang.String cleartext, java.lang.String privateKey)
          PRIVATE: FOR INTERNAL USE ONLY Encrypt specified text with a specified private key.
static java.lang.String encryptWithPublicKey(java.lang.String cleartext, java.lang.String publicKey)
          Encrypt specified text with a specified public key.
static java.lang.String[] makeKeyPair(java.lang.String pwd, java.lang.String keySeed)
          Create a private / public key pair based on a given seed value.
static java.lang.String makePublicKey(java.lang.String keySeed)
          Generate a public key for a given key seed value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PkCrypt

public PkCrypt()
Method Detail

makeKeyPair

public static java.lang.String[] makeKeyPair(java.lang.String pwd,
                                             java.lang.String keySeed)
Create a private / public key pair based on a given seed value.

Parameters:
pwd - password needed to use this API
keySeed - seed for key creation.
Returns:
vector of generated public and private keys in that order.

makePublicKey

public static java.lang.String makePublicKey(java.lang.String keySeed)
Generate a public key for a given key seed value. This is all that's available to the ezlm ISV.

Parameters:
keySeed - seed for key creation.
Returns:
generated public key.

encryptWithPublicKey

public static java.lang.String encryptWithPublicKey(java.lang.String cleartext,
                                                    java.lang.String publicKey)
Encrypt specified text with a specified public key.

Parameters:
cleartext - the text to encrypt
publicKey - the public key to use for encryption
Returns:
encrypted text

decryptWithPublicKey

public static java.lang.String decryptWithPublicKey(java.lang.String crypttext,
                                                    java.lang.String publicKey)
Decrypt specified encrypted text with a specified public key.

Parameters:
crypttext - the encrypted text to decrypt
publicKey - the public key to use for decryption
Returns:
decrypted cleartext

encryptWithPrivateKey

public static java.lang.String encryptWithPrivateKey(java.lang.String password,
                                                     java.lang.String cleartext,
                                                     java.lang.String privateKey)
PRIVATE: FOR INTERNAL USE ONLY Encrypt specified text with a specified private key.

Parameters:
password - password for using this API
cleartext - the text to encrypt
privateKey - the private key to use for encryption
Returns:
encrypted text

decryptWithPrivateKey

public static java.lang.String decryptWithPrivateKey(java.lang.String password,
                                                     java.lang.String crypttext,
                                                     java.lang.String privateKey)
PRIVATE: FOR INTERNAL USE ONLY Decrypt specified encrypted text with a specified private key.

Parameters:
password - password for using this API
crypttext - the encrypted text to decrypt
privateKey - the private key to use for decryption
Returns:
decrypted cleartext