Skip to content

Commit 371ef6a

Browse files
committed
Fix a bug: ECDSASignature toByteArray is not 65 bytes always.
1 parent c30d1bc commit 371ef6a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/main/java/org/tron/common/crypto/ECKey.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,8 +1209,8 @@ public byte[] toByteArray() {
12091209
: this.v;
12101210

12111211
return ByteUtil.merge(
1212-
ByteUtil.bigIntegerToBytes(this.r),
1213-
ByteUtil.bigIntegerToBytes(this.s),
1212+
ByteUtil.bigIntegerToBytes(this.r, 32),
1213+
ByteUtil.bigIntegerToBytes(this.s,32),
12141214
new byte[]{fixedV});
12151215
}
12161216

0 commit comments

Comments
 (0)