summary refs log tree commit diff stats
path: root/src/main/java/ganarchy/friendcode/util/KeyUtil.java
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-07-25 23:08:13 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-07-25 23:08:13 -0300
commitcb7937f5c6a6677d52efed7caef935dc2e397157 (patch)
tree4e0f3e051b82ae6d7245adf0e54b99d4f786beaa /src/main/java/ganarchy/friendcode/util/KeyUtil.java
parent97c48aa55abca34478f470fa99c3a150c6629f16 (diff)
Finish world key machinery API
Still need to implement the actual functionality.
Diffstat (limited to 'src/main/java/ganarchy/friendcode/util/KeyUtil.java')
-rw-r--r--src/main/java/ganarchy/friendcode/util/KeyUtil.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/main/java/ganarchy/friendcode/util/KeyUtil.java b/src/main/java/ganarchy/friendcode/util/KeyUtil.java
index e8e07e5..ab5d614 100644
--- a/src/main/java/ganarchy/friendcode/util/KeyUtil.java
+++ b/src/main/java/ganarchy/friendcode/util/KeyUtil.java
@@ -3,12 +3,27 @@ package ganarchy.friendcode.util;
 import java.nio.file.Path;
 
 /**
-* Helper to deal with private keys.
-*/
+ * Helper to deal with private keys.
+ */
 public class KeyUtil {
+    /**
+     * Reads and decrypts a private key file.
+     *
+     * @param keyFile The path to the key file.
+     * @return The decrypted private key, or null if it doesn't exist.
+     */
     public static String readKeyFile(Path keyFile) {
         return null;
     }
+
+
+    /**
+     * Encrypts and writes a private key file.
+     *
+     * @param keyFile The path to the key file.
+     * @param key     The private key.
+     * @return Whether writing the key succeeded.
+     */
     public static boolean writeKeyFile(Path keyFile, String key) {
         return false;
     }