Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #26 from admin-ch/feature/sync-mapper-fix
Browse files Browse the repository at this point in the history
fix normalizeEcCurvePoint for byte arrays with length < 32
  • Loading branch information
ubhaller authored Jul 6, 2021
2 parents e079ed9 + b51ee5b commit 132892a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private static String normalizeEcCurvePoint(byte[] array) {
if (array.length == 33) {
System.arraycopy(array, 1, unsignedArr, 0, byteArrayLength);
} else {
System.arraycopy(array, 0, unsignedArr, 0, byteArrayLength);
System.arraycopy(array, 0, array.length, byteArrayLength - array.length, array.length);
}

return Base64.getEncoder().encodeToString(unsignedArr);
Expand Down

0 comments on commit 132892a

Please sign in to comment.