Merge pull request #2073 from CherryRum/v5-dev

fix SM2.getDHex() Method
This commit is contained in:
Golden Looly 2022-01-07 09:08:44 +08:00 committed by GitHub
commit ba01943d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,7 +531,7 @@ public class SM2 extends AbstractAsymmetricCrypto<SM2> {
* @since 5.7.17 * @since 5.7.17
*/ */
public String getDHex() { public String getDHex() {
return getDBigInteger().toString(16); return String.format("%064x", new BigInteger(1, getD()));
} }
/** /**