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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user