|
Abeona 2012.1 API | |||||||
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.
Field Summary | |
---|---|
static java.lang.String |
UNLICENSED
This constant is returned by method getSerial() if Abeona is running in unlicensed
mode. |
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. |
void |
generateLicense(java.lang.Integer productId,
java.util.Properties properties,
java.lang.String targetFileName)
Generates new license file. |
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. |
static Abeona |
getInstance()
Returns the default instance of Abeona. |
LicenseGenerator |
getLicenseGenerator()
Returns instance of LicenseGenerator. |
static java.io.OutputStream |
getOutputStream(java.lang.String fileName)
Returns OutputStream for given file name. |
java.lang.String |
getOwner()
Returns the owner of this Abeona license or constant UNLICENSED if this is not valid (purchased) license. |
java.lang.String |
getSerial()
Returns the serial number of this Abeona license or constant UNLICENSED if this is not valid (purchased) license. |
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 |
Field Detail |
---|
public static final java.lang.String UNLICENSED
getSerial()
if Abeona is running in unlicensed
mode.
Method Detail |
---|
public java.io.File getAbeonaDirectory()
public java.lang.String getSerial()
public java.lang.String getOwner()
public LicenseGenerator getLicenseGenerator()
public Database getDatabase()
public void generateLicense(java.lang.Integer productId, java.util.Properties properties, java.lang.String targetFileName) throws LicenseException, java.io.IOException
Properties properties = new Properties (); properties.setProperty ("customer", "Very Big Company"); properties.setProperty ("dbAccess", "enabled"); properties.setProperty ("netUpdate", "disabled"); properties.setProperty ("user.count", "25"); Abeona instance = Abeona.getInstance (); instance.generateLicense (selectedProductId, properties, "d:/licenses/file001.license");
productId
- - identifier of Product for which should be generated new licenseproperties
- - properties (names and values) to protect by Abeona systemtargetFileName
- - qualified name of the file to which should be generated license
LicenseException
- if cannot find Product with given productId or if cannot generate license
java.io.IOException
- if there is some I/O problempublic 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 Abeona getInstance()
public static void main(java.lang.String[] arg)
arg
- no arguments or name of class to control
|
Abeona 2012.1 API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |