You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ol...@apache.org on 2019/12/12 16:51:09 UTC
[sling-org-apache-sling-commons-crypto] 02/03: SLING-8885 Provide
an extensible crypto implementation based on Jasypt
This is an automated email from the ASF dual-hosted git repository.
olli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-commons-crypto.git
commit d56ce8ac71a73e08042f3b1de697523b10e52777
Author: Oliver Lietz <ol...@apache.org>
AuthorDate: Thu Dec 12 16:23:05 2019 +0100
SLING-8885 Provide an extensible crypto implementation based on Jasypt
* Align parameter name to CryptoService interface
* Mark some configuration properties as not required and remove defaults
---
.../JasyptStandardPBEStringCryptoService.java | 4 ++--
...tandardPBEStringCryptoServiceConfiguration.java | 28 +++++++++++++---------
2 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoService.java b/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoService.java
index c78e385..bd0830d 100644
--- a/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoService.java
+++ b/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoService.java
@@ -136,8 +136,8 @@ public class JasyptStandardPBEStringCryptoService implements CryptoService {
}
@Override
- public @NotNull String decrypt(@NotNull final String message) {
- return encryptor.decrypt(message);
+ public @NotNull String decrypt(@NotNull final String ciphertext) {
+ return encryptor.decrypt(ciphertext);
}
}
diff --git a/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoServiceConfiguration.java b/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoServiceConfiguration.java
index 46b5e8b..a1ff1d6 100644
--- a/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoServiceConfiguration.java
+++ b/src/main/java/org/apache/sling/commons/crypto/jasypt/internal/JasyptStandardPBEStringCryptoServiceConfiguration.java
@@ -34,9 +34,10 @@ import static org.jasypt.encryption.pbe.StandardPBEByteEncryptor.DEFAULT_KEY_OBT
@AttributeDefinition(
name = "Names",
- description = "names of this service"
+ description = "names of this service",
+ required = false
)
- String[] names() default {"default"};
+ String[] names() default {};
@AttributeDefinition(
name = "Algorithm",
@@ -52,7 +53,8 @@ import static org.jasypt.encryption.pbe.StandardPBEByteEncryptor.DEFAULT_KEY_OBT
@AttributeDefinition(
name = "Security Provider Name",
- description = "name of the Security Provider"
+ description = "name of the Security Provider",
+ required = false
)
String securityProviderName();
@@ -68,27 +70,31 @@ import static org.jasypt.encryption.pbe.StandardPBEByteEncryptor.DEFAULT_KEY_OBT
@AttributeDefinition(
name = "Password Provider Target",
- description = "filter expression to target a Password Provider"
+ description = "filter expression to target a Password Provider",
+ required = false
)
- String passwordProvider_target() default "*";
+ String passwordProvider_target();
@AttributeDefinition(
name = "Security Provider Target",
- description = "filter expression to target a Security Provider"
+ description = "filter expression to target a Security Provider",
+ required = false
)
- String securityProvider_target() default "*";
+ String securityProvider_target();
@AttributeDefinition(
name = "IV Generator Target",
- description = "filter expression to target an IV Generator"
+ description = "filter expression to target an IV Generator",
+ required = false
)
- String ivGenerator_target() default "*";
+ String ivGenerator_target();
@AttributeDefinition(
name = "Salt Generator Target",
- description = "filter expression to target a Salt Generator"
+ description = "filter expression to target a Salt Generator",
+ required = false
)
- String saltGenerator_target() default "*";
+ String saltGenerator_target();
String webconsole_configurationFactory_nameHint() default "{names} {algorithm}";