|
WEBsina Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.websina.license.SignatureUtil
This is a utility class for sign and verify the signature.
Method Summary | |
static java.lang.String |
sign(java.lang.String data,
byte[] encodedPrivateKey)
This method creates the signature based on the license data and the private key. |
static boolean |
verify(java.lang.String data,
byte[] signature,
byte[] encodedPublicKey)
This method validate license data based on the signature and the public key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String sign(java.lang.String data, byte[] encodedPrivateKey) throws java.security.GeneralSecurityException
data
- the license data.encodedPrivateKey
- the private key.
java.security.GeneralSecurityException
public static boolean verify(java.lang.String data, byte[] signature, byte[] encodedPublicKey) throws java.security.GeneralSecurityException
data
- the license data.encodedPublicKey
- the public key.
java.security.GeneralSecurityException
|
WEBsina Software | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |