| .. | .. |
|---|
| 9 | 9 | |
|---|
| 10 | 10 | public class LicUtils { |
|---|
| 11 | 11 | |
|---|
| 12 | | - private static final Logger log = LogManager.getLogger(LicUtils.class); |
|---|
| 12 | + private static final Logger LOG = LogManager.getLogger(LicUtils.class); |
|---|
| 13 | 13 | |
|---|
| 14 | 14 | public static String md5(String str) { |
|---|
| 15 | 15 | try { |
|---|
| .. | .. |
|---|
| 18 | 18 | BigInteger i = new BigInteger(1, mDigest.digest()); |
|---|
| 19 | 19 | return String.format("%1$032x", i); |
|---|
| 20 | 20 | } catch (NoSuchAlgorithmException e) { |
|---|
| 21 | | - log.error("Error generating MD5 for string: " + str, e); |
|---|
| 21 | + LOG.error("Error generating MD5 for string: " + str, e); |
|---|
| 22 | 22 | } |
|---|
| 23 | 23 | return null; |
|---|
| 24 | 24 | } |
|---|
| .. | .. |
|---|
| 34 | 34 | BigInteger i = new BigInteger(1, mDigest.digest()); |
|---|
| 35 | 35 | return String.format("%1$064x", i); |
|---|
| 36 | 36 | } catch (NoSuchAlgorithmException e) { |
|---|
| 37 | | - log.error("Error generating SHA-256 for bytes: " + bytes, e); |
|---|
| 37 | + LOG.error("Error generating SHA-256 for bytes: " + bytes, e); |
|---|
| 38 | 38 | } |
|---|
| 39 | 39 | return null; |
|---|
| 40 | 40 | } |
|---|
| .. | .. |
|---|
| 48 | 48 | BigInteger i = new BigInteger(1, mDigest.digest()); |
|---|
| 49 | 49 | return String.format("%1$064x", i); |
|---|
| 50 | 50 | } catch (NoSuchAlgorithmException e) { |
|---|
| 51 | | - log.error("Error generating SHA-256 for bytes: " + bytes, e); |
|---|
| 51 | + LOG.error("Error generating SHA-256 for bytes: " + bytes, e); |
|---|
| 52 | 52 | } |
|---|
| 53 | 53 | return null; |
|---|
| 54 | 54 | } |
|---|