File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
springboot-starter-security/src/main/java/com/codingapi/springboot/security/crypto Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 11package com .codingapi .springboot .security .crypto ;
22
33import com .codingapi .springboot .framework .crypto .AES ;
4+ import lombok .Getter ;
45import lombok .SneakyThrows ;
56
67import java .nio .charset .StandardCharsets ;
78import java .util .Base64 ;
89
910public class AESTools {
1011
12+ @ Getter
1113 private final static AESTools instance = new AESTools ();
1214
1315 private AES aes ;
@@ -19,10 +21,6 @@ void init(AES aes) {
1921 this .aes = aes ;
2022 }
2123
22- public static AESTools getInstance () {
23- return instance ;
24- }
25-
2624 @ SneakyThrows
2725 public String encode (String input ) {
2826 return Base64 .getEncoder ().encodeToString (aes .encrypt (input .getBytes (StandardCharsets .UTF_8 )));
You can’t perform that action at this time.
0 commit comments