Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use javax.security.PrivateKey and PublicKey as argument to the PrivateKey and PublicKey class wrappers #38

Open
nbaars opened this issue Aug 6, 2022 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nbaars
Copy link
Owner

nbaars commented Aug 6, 2022

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.

@nbaars nbaars added help wanted Extra attention is needed good first issue Good for newcomers labels Aug 6, 2022
@JonathanXu8
Copy link

Hi, is this issue still open?

@nbaars
Copy link
Owner Author

nbaars commented Sep 25, 2023

@JonathanXu8 yes, this issue is still open. Let me know if you like to pick it up.

@JonathanXu8
Copy link

Sounds good! I'd like to pick it up.

@JonathanXu8
Copy link

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?

@nbaars
Copy link
Owner Author

nbaars commented Oct 11, 2023

Hi @JonathanXu8 indeed only necessary for V1 and V2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants