Class Security
java.lang.Object
io.github.javaezlib.javaez.extensions.Security
The JavaEZ Security extension. Allows different security-related functions.
- Since:
- 1.6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringLocks a piece of text with a password.static StringunlockText(String text, String password) Unlocks some text that was locked usinglockText(String, String).
-
Constructor Details
-
Security
public Security()
-
-
Method Details
-
lockText
Locks a piece of text with a password. (For technical people: This function encrypts the data in the text using AES-256-GCM with a PBKDF2-based cipher generated from the password)- Parameters:
text- The text to lockpassword- The password to use- Returns:
- The locked text
- Since:
- 1.6
-
unlockText
Unlocks some text that was locked usinglockText(String, String). (For technical people: This function decrypts the data in the text using AES-256-GCM with a PBKDF2-based cipher generated from the password)- Parameters:
text- The locked text to unlockpassword- The password used to lock the text- Returns:
- The unlocked text
- Since:
- 1.6
-