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 1
1
package com .codingapi .springboot .security .crypto ;
2
2
3
3
import com .codingapi .springboot .framework .crypto .AES ;
4
+ import lombok .Getter ;
4
5
import lombok .SneakyThrows ;
5
6
6
7
import java .nio .charset .StandardCharsets ;
7
8
import java .util .Base64 ;
8
9
9
10
public class AESTools {
10
11
12
+ @ Getter
11
13
private final static AESTools instance = new AESTools ();
12
14
13
15
private AES aes ;
@@ -19,10 +21,6 @@ void init(AES aes) {
19
21
this .aes = aes ;
20
22
}
21
23
22
- public static AESTools getInstance () {
23
- return instance ;
24
- }
25
-
26
24
@ SneakyThrows
27
25
public String encode (String input ) {
28
26
return Base64 .getEncoder ().encodeToString (aes .encrypt (input .getBytes (StandardCharsets .UTF_8 )));
You can’t perform that action at this time.
0 commit comments