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 java.security classes in preference to string-wrappers #147

Merged

Commits on Jul 23, 2024

  1. Use java.security classes in preference to string-wrappers

    This change deletes the `PublicKey` & `PrivateKey` classes in our
    `com.gu.pandomainauth` package, which were simple string-wrapper classes that held
    base64-encoded text representations of cryptographic keys.
    
    The `java.security` classes `PublicKey` & `PrivateKey` already exist and, as they
    represent fully-decoded keys, don't need to be _repeatedly_ decoded from strings the
    way we had to with our string-wrapper classes. Consequently, the `signData()` &
    `verifySignature()` methods on `Crypto` are now a bit simpler and more efficient.
    
    We can also use the `java.security.KeyPair` class to represent the pair of public &
    private keys.
    rtyley committed Jul 23, 2024
    Configuration menu
    Copy the full SHA
    72601f7 View commit details
    Browse the repository at this point in the history