docs: updated javadoc
This commit is contained in:
@@ -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 {
|
||||
|
||||
+3
-2
@@ -29,7 +29,8 @@ package com.onixbyte.security.exception;
|
||||
* <p><b>Example usage:</b></p>
|
||||
* <pre>{@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;
|
||||
* }</pre>
|
||||
*
|
||||
* @author zihluwang
|
||||
* @version 1.6.0
|
||||
* @version 2.0.0
|
||||
* @since 1.6.0
|
||||
*/
|
||||
public class KeyLoadingException extends RuntimeException {
|
||||
|
||||
@@ -48,6 +48,10 @@ import java.util.Base64;
|
||||
* -----END EC PUBLIC KEY-----""";
|
||||
* ECPublicKey publicKey = KeyLoader.loadPublicKey(pemPublicKey);
|
||||
* }</pre>
|
||||
*
|
||||
* @author zihluwang
|
||||
* @version 2.0.0
|
||||
* @since 2.0.0
|
||||
*/
|
||||
public class EcKeyLoader implements KeyLoader {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ It is quite simple to install this module by `Maven`. The only thing you need to
|
||||
<version>${simple-jwt-${any-implementation}.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.org.codecrafters</groupId>
|
||||
<groupId>com.onixbyte</groupId>
|
||||
<artifactId>simple-jwt-spring-boot-starter</artifactId>
|
||||
<version>${simple-jwt-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user