In version 3.4, the _RSA.Encryption.PublicKey introduced a set of unsafe APIs to handle cases where keySizeInBits is less than 2048. However, in the implementation, the boundary check for keySizeInBits in init(unsafePEMRepresentation:) was incorrectly set as self.keySizeInBits >= 2048. Similar APIs indicate that it should actually be self.keySizeInBits >= 1024. This PR attempts to correct this issue.
In version 3.4, the
_RSA.Encryption.PublicKey
introduced a set of unsafe APIs to handle cases wherekeySizeInBits
is less than 2048. However, in the implementation, the boundary check forkeySizeInBits
ininit(unsafePEMRepresentation:)
was incorrectly set asself.keySizeInBits >= 2048
. Similar APIs indicate that it should actually beself.keySizeInBits >= 1024
. This PR attempts to correct this issue.