我可以使用EncryptableProperties使用jasypt加密和解密.properties文件中的凭证。因为我想使用我自己的算法或算法,如“SHA-512”如何在EncryptableProperties中实现它?Jasypt - 如何使用StrongPasswordEncryptor获取.properties文件中的凭证
是否有任何方法使用ConfigurablePasswordEncryptor或StrongPasswordEncryptor而不是我EncryptableProperties上的StringEncryptor或TextEncryptor。
StandardPBEStringEncryptor encryptor = new StandardPBEStringEncryptor();
encryptor.setPassword("OrderMod");
Properties props = new EncryptableProperties(encryptor);
props.load(new FileInputStream("mime.properties"));
String password = props.getProperty("password");
System.out.println("password:: "+password);