我可以使用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);