aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src/main/java/org/onap/policy/common/utils/security
AgeCommit message (Collapse)AuthorFilesLines
2019-10-21Add CryptoCoder interfacejhh2-7/+43
This is to allow multiple supporting implementations. Issue-ID: POLICY-1945 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I42491e5671f561fe320f034bf8ffe03848dff43f Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-10-16Removed unthrown checked exceptions from CryptoUtils.jhh1-10/+3
additional minor javadoc clean up Issue-ID: POLICY-1945 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I23927b8c4dd63ed658e8062c87b4884ea1d31825
2019-06-26Speed up CryptoUtilsTestJim Hahn1-5/+12
CryptoUtilsTest runs slowly because the SecureRandom that CryptoUtils uses to generate an "iv" takes a while to create enough randomness. However, as the "iv" is only used as a "salt", it is not necessary to use SecureRandom; the values generated by Random are sufficient. Change-Id: I1f3b03b85d28852a7969d3a83802a2691308caa5 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-12Apply simple sonar fixesJim Hahn1-11/+9
Note: A number of these were identified, by SonarLint, in the Test classes, which are not typically scanned by Sonar. Removed unnecessary imports. Removed unneeded "throws Xxx". Replaced lambda with method references. Replaced duplicate strings with constants. Replaced try-fail-catch with assert-j methods to eliminate sonar complaints about duplicate failure messages. Added missing @Override annotations. Use map.computeIfAbsent() where appropriate. Also fixed some minor checkstyle issues. Removed unneeded "volatile" declarations. Replaced some if-else constructs with "?:" construct, per sonar. Replaced Object.wait() with CountDownLatch.await(); according to sonar (and javadocs), Object.wait() can return due to "spurious wakeups". Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse. Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-03-18ONAP password encryption tool sonar fixChou, Joseph1-25/+25
Update code to fix sonar scan issues Change-Id: I5ccf3d774651bd3d8df908c1e7fe83218016a007 Issue-ID: POLICY-1561 Signed-off-by: Chou, Joseph <jc2555@att.com>
2019-03-12ONAP password encryption toolChou, Joseph1-0/+259
Migrate ECOMP Policy password encryption tool to ONAP Issue-ID: POLICY-1561 Change-Id: I9020efb7698b95c36c4ebff842a318bf8beefc69 Signed-off-by: Joseph Chou <jc2555@att.com>