Package org.switchyard.security.crypto

Examples of org.switchyard.security.crypto.PrivateCrypto


        ois.close();
        return o;
    }

    private Object sealUnseal(Serializable o) throws Exception {
        PrivateCrypto pc = new PrivateCrypto("TripleDES", 168);
        SealedObject so = pc.seal(o);
        o = pc.unseal(so);
        return o;
    }
View Full Code Here


        if (property != null) {
            Object object = property.getValue();
            if (object instanceof SecurityContext) {
                securityContext = (SecurityContext)object;
            } else if (object instanceof SealedObject) {
                PrivateCrypto privateCrypto = _systemSecurity.getPrivateCrypto();
                if (privateCrypto == null) {
                    throw new IllegalStateException("privateCrypto == null");
                }
                securityContext = (SecurityContext)privateCrypto.unseal((SealedObject)object);
            } else if (object != null) {
                throw new IllegalArgumentException(object.getClass().getName() + " != " + EXCHANGE_PROPERTY);
            }
        }
        UUID systemUUID = _systemSecurity.getUUID();
View Full Code Here

     */
    public void setContext(Exchange exchange, SecurityContext securityContext) {
        THREAD_LOCAL.set(securityContext);
        Serializable object = securityContext;
        if (object != null) {
            PrivateCrypto privateCrypto = _systemSecurity.getPrivateCrypto();
            if (privateCrypto != null) {
                object = privateCrypto.seal(object);
            }
        }
        Property property = exchange.getContext().setProperty(EXCHANGE_PROPERTY, object, Scope.EXCHANGE);
        if (property != null) {
            property.addLabels(BehaviorLabel.TRANSIENT.label());
View Full Code Here

TOP

Related Classes of org.switchyard.security.crypto.PrivateCrypto

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.