Package net.hironico.common.utils
Class NicoCrypto
java.lang.Object
net.hironico.common.utils.NicoCrypto
Classe utilitaire pour stocker des passwords dans des fichiers de config.
Elle utilise l'algorythme AES inclu dans le JDK.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SecretKeygenerate()Lazy generation of a NEW secret key token using AES algorithm.static SecretKeyGenerate a secret key from a super secret token content using AES algorithm.static SecretKeyLoads a text file with Base key data then returns a SecretKey object initialized with this key.static void
-
Constructor Details
-
NicoCrypto
public NicoCrypto()
-
-
Method Details
-
load
Loads a text file with Base key data then returns a SecretKey object initialized with this key.- Throws:
Exception
-
generate
Generate a secret key from a super secret token content using AES algorithm. -
generate
Lazy generation of a NEW secret key token using AES algorithm.- Throws:
Exception
-
main
- Throws:
Exception
-
encrypt
- Throws:
Exception
-
decrypt
- Throws:
Exception
-