mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix bug
This commit is contained in:
@@ -244,6 +244,9 @@ public class ECKeyUtil {
|
||||
* @return ECPrivateKeyParameters
|
||||
*/
|
||||
public static ECPrivateKeyParameters toPrivateParams(final String d, final ECDomainParameters domainParameters) {
|
||||
if (null == d) {
|
||||
return null;
|
||||
}
|
||||
return toPrivateParams(BigIntegers.fromUnsignedByteArray(SecureUtil.decode(d)), domainParameters);
|
||||
}
|
||||
|
||||
@@ -255,6 +258,9 @@ public class ECKeyUtil {
|
||||
* @return ECPrivateKeyParameters
|
||||
*/
|
||||
public static ECPrivateKeyParameters toPrivateParams(final byte[] d, final ECDomainParameters domainParameters) {
|
||||
if (null == d) {
|
||||
return null;
|
||||
}
|
||||
return toPrivateParams(BigIntegers.fromUnsignedByteArray(d), domainParameters);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user