Use javax.security.PrivateKey and PublicKey as argument to the PrivateKey and PublicKey class wrappers
At the moment the moment both classes take a byte[] as argument:
public PublicKey(byte[] keyMaterial, Version version) {
super(keyMaterial, version);
}
It is easier from a user perspective to change this to:
public PublicKey(javax.security.PublicKey, Version version) {
super(keyMaterial, version);
}
this way the API is not responsible for translations, we take a valid key which the user needs to obtain from a byte[], PEM encoded string etc.
Hi, is this issue still open?
@JonathanXu8 yes, this issue is still open. Let me know if you like to pick it up.
Sounds good! I'd like to pick it up.
Hi @nbaars, just like to confirm the requirements. It seems that V3 already supports public PublicKey(javax.security.PublicKey, Version version). So all I have to do is to implement the same thing for v1 and v2. Right?
Hi @JonathanXu8 indeed only necessary for V1 and V2