From cb7937f5c6a6677d52efed7caef935dc2e397157 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Mon, 25 Jul 2022 23:08:13 -0300 Subject: Finish world key machinery API Still need to implement the actual functionality. --- src/main/java/ganarchy/friendcode/util/KeyUtil.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/main/java/ganarchy/friendcode/util/KeyUtil.java') 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; } -- cgit 1.4.1