支付宝证书公钥实现方式

This commit is contained in:
egzosn
2020-10-12 22:52:22 +08:00
parent c5604f5d3a
commit 708a7b16b6
17 changed files with 3371 additions and 170 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -60,7 +60,7 @@ public class SecureUtil {
*/
public static byte[] sha1X16 (String data, String encoding) {
try {
byte[] bytes = digestByData(data.getBytes(encoding),ALGORITHM_SHA1);
byte[] bytes = digestByData(data.getBytes(encoding), ALGORITHM_SHA1);
StringBuilder sha1StrBuff = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
if (Integer.toHexString(0xFF & bytes[i]).length() == 1) {
@@ -91,7 +91,7 @@ public class SecureUtil {
public static String sha256X16Str(String data, String encoding) {
byte[] bytes =null;
try {
bytes = digestByData(data.getBytes(encoding),ALGORITHM_SHA1);
bytes = digestByData(data.getBytes(encoding), ALGORITHM_SHA1);
} catch (UnsupportedEncodingException e) {
throw new PayErrorException(new PayException("error", e.getLocalizedMessage()));
}