mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-06 13:47:47 +08:00
生成sha1签名时,加入参数判断
This commit is contained in:
parent
0fe431fc78
commit
975cfdaf77
@ -30,6 +30,10 @@ public class SHA1 {
|
|||||||
* 用&串接arr参数,生成sha1 digest
|
* 用&串接arr参数,生成sha1 digest
|
||||||
*/
|
*/
|
||||||
public static String genWithAmple(String... arr) {
|
public static String genWithAmple(String... arr) {
|
||||||
|
if (StringUtils.isAnyEmpty(arr)) {
|
||||||
|
throw new IllegalArgumentException("非法请求参数,有部分参数为空 : " + Arrays.toString(arr));
|
||||||
|
}
|
||||||
|
|
||||||
Arrays.sort(arr);
|
Arrays.sort(arr);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
for (int i = 0; i < arr.length; i++) {
|
for (int i = 0; i < arr.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user