| .. | .. |
|---|
| 47 | 47 | |
|---|
| 48 | 48 | public void prepareSignature(Signature signature, LicenseBean licBean) throws SeCurisException { |
|---|
| 49 | 49 | try { |
|---|
| 50 | | - log.info("JSON: {}", JsonUtils.toJSON(licBean)); |
|---|
| 51 | 50 | signature.update(JsonUtils.toJSON(licBean).getBytes("utf-8")); |
|---|
| 52 | 51 | signature.update(AUX.getBytes("utf-8")); |
|---|
| 53 | | - |
|---|
| 54 | 52 | } catch (SignatureException | UnsupportedEncodingException e) { |
|---|
| 55 | 53 | throw new SeCurisException("Error generating or validating signature", e); |
|---|
| 56 | 54 | } |
|---|
| .. | .. |
|---|
| 94 | 92 | KeyFactory keyFactory = KeyFactory.getInstance(DEFAULT_ALGORITHM); |
|---|
| 95 | 93 | X509EncodedKeySpec publicKeySpec = new X509EncodedKeySpec(Base64.decodeBase64(pubKeyBase64)); |
|---|
| 96 | 94 | PublicKey publicKey = keyFactory.generatePublic(publicKeySpec); |
|---|
| 97 | | - log.info("Public key read sucessfully from file: {}", publicKeyFile.getAbsolutePath()); |
|---|
| 95 | + log.debug("Public key read sucessfully from file: {}", publicKeyFile.getAbsolutePath()); |
|---|
| 98 | 96 | return publicKey; |
|---|
| 99 | 97 | } |
|---|
| 100 | 98 | |
|---|