|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.abeona.Abeona
public final class Abeona
Main class of Abeona signature system.
Loads Abeona license and checks it. Loads or creates database of
Product
instances. Runs GUI tool for user access.
This class also contains a few utility functions for work with streams and public / private keys.
Method Summary | |
---|---|
static java.security.interfaces.RSAPrivateKey |
buildPrivateKey(java.lang.String data)
Builds public key (as instance of RSAPrivateKey) from given hexadecimal String. |
static java.security.interfaces.RSAPublicKey |
buildPublicKey(java.lang.String data)
Builds public key (as instance of RSAPublicKey) from given hexadecimal String. |
static byte[] |
computeSignature(byte[] data)
Computes MD5 hash signature for given data. |
static byte[] |
decrypt(byte[] data,
java.security.Key key)
Decrypts given data with given key. |
static byte[] |
encrypt(byte[] data,
java.security.Key key)
Encrypts given data with given key. |
java.io.File |
getAbeonaDirectory()
Returns directory where is stored Abeona license file and database. |
Database |
getDatabase()
Returns product database. |
static java.io.InputStream |
getInputStream(java.lang.String fileName)
Returns InputStream for given file name. |
LicenseGenerator |
getLicenseGenerator()
Returns instance of LicenseGenerator. |
static java.io.OutputStream |
getOutputStream(java.lang.String fileName)
Returns OutputStream for given file name. |
static void |
main(java.lang.String[] arg)
Entry point to Abeona application. |
static byte[] |
toBytes(java.lang.String hexadecimalString)
Converts given hexadecimal String to byte array. |
static java.lang.String |
toString(byte[] array)
Converts given byte array to hexadecimal String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.io.File getAbeonaDirectory()
public LicenseGenerator getLicenseGenerator()
public Database getDatabase()
public static java.io.InputStream getInputStream(java.lang.String fileName)
fileName
- name of input file
public static java.io.OutputStream getOutputStream(java.lang.String fileName)
fileName
- full name of output file
public static byte[] computeSignature(byte[] data)
data
- byte array for which is computed MD5 hash
public static java.security.interfaces.RSAPublicKey buildPublicKey(java.lang.String data)
data
- encoded public key as is contained in
Product
.
java.lang.RuntimeException
- if cannot convert given String to instance of RSAPublicKeypublic static java.security.interfaces.RSAPrivateKey buildPrivateKey(java.lang.String data)
data
- encoded private key as is contained in
Product
.
java.lang.RuntimeException
- if cannot convert given String to instance of RSAPrivateKeypublic static byte[] encrypt(byte[] data, java.security.Key key)
data
- data to encryptkey
- instance of RSAPublicKey or RSAPrivateKey
java.lang.RuntimeException
- if cannot encrypt datapublic static byte[] decrypt(byte[] data, java.security.Key key)
data
- data to decryptkey
- instance of RSAPublicKey or RSAPrivateKey
java.lang.RuntimeException
- if cannot decrypt datapublic static java.lang.String toString(byte[] array)
array
- data to convert
public static byte[] toBytes(java.lang.String hexadecimalString)
hexadecimalString
- data to convert
public static void main(java.lang.String[] arg)
arg
- no arguments or name of class to control
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |