Closed areiter closed 8 years ago
Personally, I'd make the contentBytes()
function a getter instead of a function.
But otherwise, good PR! Always nice to have extra tests! :)
I used a method because valueBytes() is also a method. But a getter seems to be a cleaner approach :-)
On the other hand, a getter would be inconsistent with the already existing valueBytes()
. So I guess this is fine.
I'll take a second look and run the tests when I'm on my computer. Thanks for the PR!
Hah, you got me there.
Well, if we change both, we break compatibility, so that's maybe something for if we would change the whole interface. Nothing for the foreseeable future. So leave it as a method, it's fine.
Uhm, just wanted to merge this, but you seem to have pushed another change onto the branch. Can you set the branch one commit back and create a new PR for the other change?
(Also, it seems to me you forgot the encodeInteger
method in that new commit.)
Sorry, follow-up #19
Just in case someone else needs it, I added the extraction of parameters for a PKCS#8 encoded private key.