28 lines
728 B
Java
28 lines
728 B
Java
|
|
package ai.nomyo;
|
||
|
|
|
||
|
|
import ai.nomyo.errors.SecurityError;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author NieGestorben
|
||
|
|
* Copyright© (c) 2026, All Rights Reserved.
|
||
|
|
*/
|
||
|
|
public class Main {
|
||
|
|
|
||
|
|
static void main() {
|
||
|
|
SecureCompletionClient secureCompletionClient = new SecureCompletionClient();
|
||
|
|
//secureCompletionClient.generateKeys(true, "client_keys", "pokemon");
|
||
|
|
secureCompletionClient.loadKeys("client_keys/private_key.pem", "pokemon");
|
||
|
|
|
||
|
|
try {
|
||
|
|
secureCompletionClient.validateRsaKey(secureCompletionClient.getPrivateKey());
|
||
|
|
} catch (SecurityError e) {
|
||
|
|
System.out.println("RSA Key is to short!");
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
System.out.println("RSA Key has correct length!");
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|