Closed i1619khz closed 2 years ago
I searched for the use of guava in the jcasbin code and found only in used in Util.java. Only used for md5 encryption
https://github.com/casbin/jcasbin/blob/a21b2199bcd1199a66aebf7e86930b2218dfacd1/src/main/java/org/casbin/jcasbin/util/Util.java#L45
https://github.com/casbin/jcasbin/blob/a21b2199bcd1199a66aebf7e86930b2218dfacd1/src/main/java/org/casbin/jcasbin/util/Util.java#L292-L295
Referring to the practice of common codec, only need to jdk
public static MessageDigest getDigest(String algorithm) { try { return MessageDigest.getInstance(algorithm); } catch (NoSuchAlgorithmException e) { throw new IllegalArgumentException(e); } } public static String md5(String data) { return new String(getDigest("MD5").digest(data.getBytes(StandardCharsets.UTF_8))); }
Reduce unnecessary dependencies
@tangyang9464 @seriouszyx @elfisworking @fangzhengjin
@i1619khz Could you make a PR?
@i1619khz Could you make a PR? with pleasure
@tangyang9464 #280
I searched for the use of guava in the jcasbin code and found only in used in Util.java. Only used for md5 encryption
https://github.com/casbin/jcasbin/blob/a21b2199bcd1199a66aebf7e86930b2218dfacd1/src/main/java/org/casbin/jcasbin/util/Util.java#L45
https://github.com/casbin/jcasbin/blob/a21b2199bcd1199a66aebf7e86930b2218dfacd1/src/main/java/org/casbin/jcasbin/util/Util.java#L292-L295
Referring to the practice of common codec, only need to jdk
Reduce unnecessary dependencies