File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
src/main/java/cl/bennu/commons/utils Expand file tree Collapse file tree 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:
2020<dependency >
2121 <groupId >cl.bennu</groupId >
2222 <artifactId >commons</artifactId >
23- <version >1.0 .0</version >
23+ <version >1.1 .0</version >
2424</dependency >
2525```
2626
Original file line number Diff line number Diff line change 77
88 <groupId >cl.bennu</groupId >
99 <artifactId >commons</artifactId >
10- <version >1.0 .0</version >
10+ <version >1.1 .0</version >
1111 <name >bennu-commons</name >
1212 <description >Utilitarios bennu</description >
1313 <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