Package org.internna.iwebmvc.core.crypto.impl

Examples of org.internna.iwebmvc.core.crypto.impl.DES3CiphererDecipherer.encrypt()


    @Test
    public void setAsText() throws Exception {
        DES3CiphererDecipherer crypto = new DES3CiphererDecipherer();
        crypto.init();
        DocumentBinder binder = new DocumentBinder(crypto);
        binder.setAsText("mimeType=image/gif\nsizeInBytes=200\nuri=" + crypto.encrypt("/xx/yy.gif") + "\ncreated=2008-03-18\nidentifier=coverdata\n");
        Document doc = (Document) binder.getValue();
        assertEquals("coverdata", doc.getIdentifier());
        assertTrue(200 == doc.getSizeInBytes());
        Calendar c = Calendar.getInstance();
        assertTrue(doc.getCreated().compareTo(c.getTime()) < 0);
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.