You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And if the key isn't 2048 bits, it doesn't raise an error. Instead, it just gives you wrong (trimmed) data. In my case, my key is 3072 bit :/
Looks like it just straight up trims the bytes:
.PARAMETER Modulus
The base64 encoded modulus for the RSA algorithm. This should be in big endian order and is expected to
be 256 bytes long, but will be trimmed or padded if it is shorter or longer.
The text was updated successfully, but these errors were encountered:
I haven't really looked at this in around 3 years, I was attempting to write something purely in PS that needed to deal with PEM encoded keys, but I couldn't depend on BouncyCastle. I'm assuming I included this logic because the ASN.1 encoding had keys that weren't exactly 2048 bits and they needed to be padded or trimmed to prevent exceptions. Could you modify the logic here in your module to not perform the trimming? Just comment out that line and see if the conversion works?
And if the key isn't 2048 bits, it doesn't raise an error. Instead, it just gives you wrong (trimmed) data. In my case, my key is 3072 bit :/
Looks like it just straight up trims the bytes:
The text was updated successfully, but these errors were encountered: