File tree 3 files changed +6
-5
lines changed
src/main/kotlin/com/njkim/reactivecrypto/core/common/util
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ subprojects {
39
39
group ' com.njkimg.reactive-crypto'
40
40
41
41
ext {
42
- reactorVersion = ' 3.3.1.RELEASE '
42
+ reactorVersion = ' 3.4.5 '
43
43
kotlinJvmVersion = ' 1.3.21'
44
44
log4j2Version = ' 2.12.0'
45
45
slf4jVersion = ' 1.7.26'
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ apply plugin: 'org.jetbrains.kotlin.jvm'
4
4
dependencies {
5
5
compile " org.jetbrains.kotlin:kotlin-stdlib-jdk8"
6
6
// netty
7
- compile group : ' io.projectreactor.netty' , name : ' reactor-netty' , version : ' 1.0.3'
7
+ compile group : ' io.projectreactor.netty' , name : ' reactor-netty' , version : ' 1.0.6'
8
+ compile ' commons-codec:commons-codec:1.15'
8
9
9
10
// spring5 WebClient
10
11
compile ' org.springframework:spring-webflux:5.3.3'
Original file line number Diff line number Diff line change 16
16
17
17
package com.njkim.reactivecrypto.core.common.util
18
18
19
+ import org.apache.commons.codec.binary.Hex
19
20
import java.security.MessageDigest
20
21
import java.util.*
21
22
import javax.crypto.Mac
22
23
import javax.crypto.spec.SecretKeySpec
23
- import javax.xml.bind.DatatypeConverter
24
24
25
25
class CryptUtil {
26
26
companion object {
@@ -43,6 +43,6 @@ class CryptUtil {
43
43
44
44
fun ByteArray.toBase64String (): String = Base64 .getEncoder().encodeToString(this )
45
45
46
- fun String.hexToByteArray (): ByteArray = DatatypeConverter .parseHexBinary (this )
46
+ fun String.hexToByteArray (): ByteArray = Hex .decodeHex (this )
47
47
48
- fun ByteArray.byteArrayToHex (): String = DatatypeConverter .printHexBinary (this )
48
+ fun ByteArray.byteArrayToHex (): String = Hex .encodeHexString (this )
You can’t perform that action at this time.
0 commit comments