Package org.internna.iwebmvc.crypto

Examples of org.internna.iwebmvc.crypto.Cipherer


            try {
                JspContext context = getJspContext();
                Object val = new BeanWrapperImpl(entity).getPropertyValue(path);
                if (logger.isDebugEnabled()) logger.debug("Obtained value [" + path + "] for bean [" + entity + "]: " + val);
                if ((val != null) && encrypt) {
                    Cipherer cipher = (Cipherer) context.getAttribute(Cipherer.CIPHERER, 2);
                    val = cipher.encrypt(val.toString());
                }
                if (hasText(property)) context.setAttribute(property, val);
                else if (val != null) context.getOut().print(javascript ? encodeToJSEscapeSequences(val.toString()): encodeToHtmlEntities(val.toString()));
            } catch (Exception ex) {
                if (logger.isDebugEnabled()) logger.debug("Could not obtain a value for [" + path + "] in bean [" + entity.getClass().getName() + "]: " + ex.getMessage());
View Full Code Here


    @Override
    public void doTag() throws JspException {
        try {
            JspContext context = getJspContext();
            JspWriter out = context.getOut();
            Cipherer cipher = (Cipherer) context.getAttribute(Cipherer.CIPHERER, 2);
            String encoded = cipher.encrypt(code);
            if (logger.isDebugEnabled()) logger.debug("Ciphered [" + code + "] to [" + encoded + "] in view");
            out.print(encoded);
        } catch (java.io.IOException ex) {
            throw new JspException(ex.getMessage());
        }
View Full Code Here

TOP

Related Classes of org.internna.iwebmvc.crypto.Cipherer

Copyright © 2018 www.massapicom. 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.