Spreadsheet Toolkit

corpus.fileIO
Class CryptoLibrary

java.lang.Object
  |
  +--corpus.fileIO.CryptoLibrary

public class CryptoLibrary
extends java.lang.Object

Used to perfrom BASE64 encription and decription around a master password. http://java.isavvix.com/helloworld/display.jsp?n=CipherDemo.java
http://www.jguru.com/faq/view.jsp?EID=50208<


Constructor Summary
CryptoLibrary(java.lang.String masterpassword)
          Create the encryption/decription object for the given master password.
 
Method Summary
 java.lang.String decrypt(java.lang.String str)
          convenience method for decrypting a string.
 java.lang.String encrypt(java.lang.String str)
          convenience method for encrypting a string.
static void main(java.lang.String[] args)
          Run some tests Encrypts out a username and password using a masterpassword.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CryptoLibrary

public CryptoLibrary(java.lang.String masterpassword)
              throws java.lang.SecurityException
Create the encryption/decription object for the given master password.

Parameters:
masterpassword - The key that will be used to encrypt and decrypt any strings.
Method Detail

encrypt

public java.lang.String encrypt(java.lang.String str)
                         throws java.lang.SecurityException
convenience method for encrypting a string.

Parameters:
str - Description of the Parameter
Returns:
String the encrypted string.
Throws:
java.lang.SecurityException - Description of the Exception

decrypt

public java.lang.String decrypt(java.lang.String str)
                         throws java.lang.SecurityException
convenience method for decrypting a string.

Parameters:
str - Description of the Parameter
Returns:
String the encrypted string.
Throws:
java.lang.SecurityException - Description of the Exception

main

public static void main(java.lang.String[] args)
Run some tests Encrypts out a username and password using a masterpassword. Then reads them back in and decrypts them using the masterpassword.

Parameters:
args - [0]: username, [1] password, [2] masterpassword

Spreadsheet Toolkit

Project Home Page