From 0b04bf23ed5c4b1bb417bf2e8a4373f996ea817f Mon Sep 17 00:00:00 2001 From: zihluwang Date: Sun, 26 Jan 2025 21:07:49 +0800 Subject: [PATCH] docs: updated javadoc --- .../src/main/java/com/onixbyte/security/KeyLoader.java | 5 +---- .../com/onixbyte/security/exception/KeyLoadingException.java | 5 +++-- .../main/java/com/onixbyte/security/impl/EcKeyLoader.java | 4 ++++ simple-jwt-spring-boot-starter/README.md | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/key-pair-loader/src/main/java/com/onixbyte/security/KeyLoader.java b/key-pair-loader/src/main/java/com/onixbyte/security/KeyLoader.java index 5cbd52f..0fa6a63 100644 --- a/key-pair-loader/src/main/java/com/onixbyte/security/KeyLoader.java +++ b/key-pair-loader/src/main/java/com/onixbyte/security/KeyLoader.java @@ -17,11 +17,8 @@ package com.onixbyte.security; -import com.onixbyte.security.exception.KeyLoadingException; - import java.security.PrivateKey; import java.security.PublicKey; -import java.security.interfaces.ECPrivateKey; /** * The {@code KeyLoader} class provides utility methods for loading keys pairs from PEM-formatted @@ -31,7 +28,7 @@ import java.security.interfaces.ECPrivateKey; * from PEM-formatted strings for cryptographic operations. * * @author zihluwang - * @version 1.6.0 + * @version 2.0.0 * @since 1.6.0 */ public interface KeyLoader { diff --git a/key-pair-loader/src/main/java/com/onixbyte/security/exception/KeyLoadingException.java b/key-pair-loader/src/main/java/com/onixbyte/security/exception/KeyLoadingException.java index 853f203..3c4cabc 100644 --- a/key-pair-loader/src/main/java/com/onixbyte/security/exception/KeyLoadingException.java +++ b/key-pair-loader/src/main/java/com/onixbyte/security/exception/KeyLoadingException.java @@ -29,7 +29,8 @@ package com.onixbyte.security.exception; *

Example usage:

*
{@code
  * try {
- *     ECPrivateKey privateKey = KeyLoader.loadEcdsaPrivateKey(pemPrivateKey);
+ *     KeyLoader keyLoader = new EcKeyLoader();
+ *     ECPrivateKey privateKey = keyLoader.loadPrivateKey(pemPrivateKey);
  * } catch (KeyLoadingException e) {
  *     // Handle the exception
  *     e.printStackTrace();
@@ -37,7 +38,7 @@ package com.onixbyte.security.exception;
  * }
* * @author zihluwang - * @version 1.6.0 + * @version 2.0.0 * @since 1.6.0 */ public class KeyLoadingException extends RuntimeException { diff --git a/key-pair-loader/src/main/java/com/onixbyte/security/impl/EcKeyLoader.java b/key-pair-loader/src/main/java/com/onixbyte/security/impl/EcKeyLoader.java index 867e968..4542c7c 100644 --- a/key-pair-loader/src/main/java/com/onixbyte/security/impl/EcKeyLoader.java +++ b/key-pair-loader/src/main/java/com/onixbyte/security/impl/EcKeyLoader.java @@ -48,6 +48,10 @@ import java.util.Base64; * -----END EC PUBLIC KEY-----"""; * ECPublicKey publicKey = KeyLoader.loadPublicKey(pemPublicKey); * } + * + * @author zihluwang + * @version 2.0.0 + * @since 2.0.0 */ public class EcKeyLoader implements KeyLoader { diff --git a/simple-jwt-spring-boot-starter/README.md b/simple-jwt-spring-boot-starter/README.md index 772be19..8b3a8ca 100644 --- a/simple-jwt-spring-boot-starter/README.md +++ b/simple-jwt-spring-boot-starter/README.md @@ -29,7 +29,7 @@ It is quite simple to install this module by `Maven`. The only thing you need to ${simple-jwt-${any-implementation}.version} - cn.org.codecrafters + com.onixbyte simple-jwt-spring-boot-starter ${simple-jwt-spring-boot-starter.version} @@ -50,7 +50,7 @@ Find `build.gradle` in the needed project, and add the following code to the `de ```groovy implementation '${implementation-builder-group-id}:simple-jwt-${any-implementation}:${simple-jwt-${any-implementation}.version}' -implementation 'cn.org.codecrafters:simple-jwt-spring-boot-starter:${simple-jwt-spring-boot-starter.version}' +implementation 'com.onixbyte:simple-jwt-spring-boot-starter:${simple-jwt-spring-boot-starter.version}' ``` ### If you are not using `Maven` or `Gradle`