Commit 3c19f321 authored by Patrik Dufresne's avatar Patrik Dufresne

Change the creation of the signature.

parent 06aaa29f
......@@ -25,7 +25,9 @@ import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.Provider;
import java.security.PublicKey;
import java.security.Security;
import java.security.Signature;
import java.security.SignatureException;
import java.security.spec.InvalidKeySpecException;
......@@ -167,6 +169,10 @@ public class EncryptionManager {
throw new UnsupportedOperationException("Can't sign when the private key is not available.");
}
for (Provider p : Security.getProviders()) {
System.out.println(p.getName());
}
// Initialize the signing algorithm with our private key
Signature rsaSignature = Signature.getInstance("SHA1withRSA");
rsaSignature.initSign(privateKey);
......
......@@ -235,6 +235,7 @@ public class LicenseManager {
out.writeChars(key);
out.writeChars(value);
}
out.flush();
byte[] data = dataStream.toByteArray();
out.close();
return data;
......
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAnqTSA0yFOc+POCS/f/CRM0Ju9O0E7fcUO8nKS0Pad3VU0Xm/
3CJ4Tsa77q9ZV6CybI8oaQlfsgXAQRrL2n+R07anmNsZp+HSIG4E+OwJAJRBAimW
xBd2eSBhYWDLnwcQZLdtD8w75HMF/aOP6HiYQodddf8IWYM/O8xsppfYCiMgeuY5
MDjvF64IY0hhhmTORduPatTuEyv2L4aLPAngS2L5HcAGJ9IHsE5jPzyUzKZdtAqr
ZIGAkDaaxnslq0QBvuPOIEkdB75XPbzc5D2J7SJRKuiD3TUgAiWva09WwH57I4oY
G9jvZtqFg+k3mkHvwsTDq53GAG8q5eoWLLLyQwIDAQABAoIBAQCGE45as2U1QrIs
JQKjwlE1HURhQ6AS7ervzM9nZOVSaJtSnq8EAS3khhl21EORx4KENUlV3FJARpQB
cgAvnflFEO38RdAdDsFkHxecuP+yuZlnlnaRK7M5E6C5h/EPagz00gEehOFpZbz+
bCnHs4QbVgQrIWuRG1dp1o9NDK/NgCXEqF7guZDusWEI/lJZNII8Lg2ub4dDyXED
x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EUKHkcBXu1REabTrxKhD3mfQ
xKJdo66o6utNlJGzXLFpiXoH5R79T3ZQSjkCAwEAAQJBAIfZI1AqbNQgnTW2+LWY
xc13GrTZDGkMHOcFfsJLBQdQNKWxCtTtiCDvK77ieNj9HeeeXh4VqeP8otjCe/w2
gGUCIQDpGHeypfubSATdcYbJpptFr9/C+GU50+/PPu4GcyCAtwIhANtyiDGJiWJs
7/TLOoDx1fn7r227o1V1n1iFKi/WbryPAiEAu25bQaHKMdC1aMMS2S9JB74mNYa7
DsbmvEUj7LfCWP0CIQDN+SVeIbLiwE9FnA8wgk0OEy8otwrqprlGs87SEdnkfwIg
WfJ3A3cxhZ3h4kGpDP4koFhISzupG8Y5vZ5O4hAyFDA=
-----END RSA PRIVATE KEY-----
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment