This commit is contained in:
2023-07-05 14:14:44 +08:00
parent 0047fea676
commit 32abe711f5

View File

@@ -72,6 +72,7 @@ public class AdapayUtil {
signature.update(data.getBytes(StandardCharsets.UTF_8)); signature.update(data.getBytes(StandardCharsets.UTF_8));
return Base64.getEncoder().encodeToString(signature.sign()); return Base64.getEncoder().encodeToString(signature.sign());
} catch (Exception e) { } catch (Exception e) {
log.error("sign Exception", e);
return null; return null;
} }
} }
@@ -97,7 +98,7 @@ public class AdapayUtil {
signature.update(data.getBytes(StandardCharsets.UTF_8)); signature.update(data.getBytes(StandardCharsets.UTF_8));
return signature.verify(Base64.getDecoder().decode(sign)); return signature.verify(Base64.getDecoder().decode(sign));
} catch (Exception e) { } catch (Exception e) {
log.error("Exception", e); log.error("verify Exception", e);
return false; return false;
} }
} }