Examples of encrypted()


Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

            }
            buffer.append(StringUtil.urlEncode(param.name)).append('=');
            if (param.value != null) {
                ValidationMetadata validation = validations.get(param.name);
                String formatted = format(param.value);
                if (validation != null && validation.encrypted())
                    formatted = CryptoUtil.encrypt(formatted);
                buffer.append(StringUtil.urlEncode(formatted));
            }
        }
        return buffer.toString();
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

                if (value != null) {
                    // format (and maybe encrypt) the value as a string
                    String formatted = format(value);
                    ValidationMetadata validation = validations.get(parameter.getName());
                    if (validation != null && validation.encrypted())
                        formatted = CryptoUtil.encrypt(formatted);

                    // if after formatting we still have a value then embed it in the URI
                    if (formatted != null && formatted.length() > 0) {
                        if (nextLiteral != null) {
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

                if (fieldInfo.length() > 0)
                    fieldInfo.append(',');

                fieldInfo.append("required:").append(data.required())
                        .append(",ignore:").append(data.ignore())
                        .append(",encrypted:").append(data.encrypted())
                        .append(",trim:").append(data.trim());

                if (data.on() != null) {
                    fieldInfo.append(",on:[");
                    Iterator<String> it = data.on().iterator();
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

                    // in the set of fields that were on the page
                    if (!wizard || fieldsOnPage.contains(propertyName)) {
                        String[] values = trim(request.getParameterValues(propertyName), validationInfo);

                        // Decrypt encrypted fields before checking for null
                        if (validationInfo.encrypted()) {
                            for (int i = 0, n = values.length; i < n; i++) {
                                if (values[i] != null)
                                    values[i] = CryptoUtil.decrypt(values[i]);
                            }
                        }
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationMetadata.encrypted()

        // encrypt the formatted value if required
        if (forOutput && formatted != null) {
            try {
                ValidationMetadata validate = getValidationMetadata();
                if (validate != null && validate.encrypted())
                    formatted = CryptoUtil.encrypt(formatted);
            }
            catch (JspException e) {
                throw new StripesRuntimeException(e);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.