All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.autoconfigure.bootstrap.RsaProperties Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.bootstrap;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.zodiac.commons.constants.Constants;
import org.zodiac.commons.constants.SystemPropertiesConstants;

@ConditionalOnClass(value = {org.springframework.security.rsa.crypto.RsaAlgorithm.class})
@ConfigurationProperties(prefix = SystemPropertiesConstants.Zodiac.SPRING_BOOTSTRAP_ENCRYPT_RSA_PREFIX)
public class RsaProperties {

    /**
     * The RSA algorithm to use (DEFAULT or OEAP). Once it is set, do not change it (or existing ciphers will not be
     * decryptable).
     */
    private org.springframework.security.rsa.crypto.RsaAlgorithm algorithm =
        org.springframework.security.rsa.crypto.RsaAlgorithm.DEFAULT;

    /**
     * Flag to indicate that "strong" AES encryption should be used internally. If true, then the GCM algorithm is
     * applied to the AES encrypted bytes. Default is false (in which case "standard" CBC is used instead). Once it is
     * set, do not change it (or existing ciphers will not be decryptable).
     */
    private boolean strong = false;

    /**
     * Salt for the random secret used to encrypt cipher text. Once it is set, do not change it (or existing ciphers
     * will not be decryptable).
     */
    private String salt = Constants.Zodiac.DEFAULT_ENCRYPTION_SALT;

    public org.springframework.security.rsa.crypto.RsaAlgorithm getAlgorithm() {
        return this.algorithm;
    }

    public void setAlgorithm(org.springframework.security.rsa.crypto.RsaAlgorithm algorithm) {
        this.algorithm = algorithm;
    }

    public boolean isStrong() {
        return this.strong;
    }

    public void setStrong(boolean strong) {
        this.strong = strong;
    }

    public String getSalt() {
        return this.salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy