File tree 3 files changed +21
-2
lines changed
src/main/java/cl/bennu/commons/utils
3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ You can pull it from the central Maven repositories:
20
20
<dependency >
21
21
<groupId >cl.bennu</groupId >
22
22
<artifactId >commons</artifactId >
23
- <version >1.0 .0</version >
23
+ <version >1.1 .0</version >
24
24
</dependency >
25
25
```
26
26
Original file line number Diff line number Diff line change 7
7
8
8
<groupId >cl.bennu</groupId >
9
9
<artifactId >commons</artifactId >
10
- <version >1.0 .0</version >
10
+ <version >1.1 .0</version >
11
11
<name >bennu-commons</name >
12
12
<description >Utilitarios bennu</description >
13
13
<url >https://github.com/bennu/commons</url >
Original file line number Diff line number Diff line change
1
+ package cl .bennu .commons .utils ;
2
+
3
+ public class Base64Util {
4
+ public static String encode (String value ) {
5
+ return java .util .Base64 .getEncoder ().encodeToString (value .getBytes ());
6
+ }
7
+
8
+ public static byte [] decode (String value ) {
9
+ return java .util .Base64 .getDecoder ().decode (value );
10
+ }
11
+
12
+ public static byte [] decode (byte [] value ) {
13
+ return java .util .Base64 .getDecoder ().decode (value );
14
+ }
15
+
16
+ public static String decodeToString (String value ) {
17
+ return new String (java .util .Base64 .getDecoder ().decode (value ));
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments