java.lang.Object
com.sourcetap.license.LicenseGenerator
- public class LicenseGenerator
- extends java.lang.Object
Generate an encrypted license
- Version:
- $Revision$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LicenseGenerator
public LicenseGenerator()
generateLicense
public static java.lang.String generateLicense(java.lang.String license,
java.lang.String privateKeyFile)
throws LicenseException
- return an encrypted license by signing the license with the private key file and encoding the result
in Base64
signMessage
private static java.lang.String signMessage(java.lang.String message,
java.lang.String privateKeyFile)
throws java.io.IOException,
java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
java.security.InvalidKeyException,
java.security.SignatureException,
java.security.spec.InvalidKeySpecException
saveSignature
private static void saveSignature(java.lang.String signature,
java.lang.String signatureFile)
throws java.io.IOException
readPrivateKey
public static java.security.PrivateKey readPrivateKey(java.lang.String URI)
throws LicenseException
- read a private key from the specified file