Package abstrasy.libraries.io

Examples of abstrasy.libraries.io.External_Buffer


    public Node external_encrypt(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(2);
        Buffer src = ((External_Buffer) AExtTools.getArgExternalInstance(startAt, 1, External_Buffer.class, Node.ACCESSVTYPE_MUTABLE_WRITELOCK)).getBuffer();
        Cipher cipher = Cipher.getInstance("Blowfish");
        cipher.init(Cipher.ENCRYPT_MODE, secretKey);
        External_Buffer res = new External_Buffer();
        Buffer bu = new Buffer(cipher.doFinal(src.getArray()));
        res.setBuffer(bu);
        return Node.createExternal(res);
    }
View Full Code Here


    public Node external_decrypt(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(2);
        Buffer src = ((External_Buffer) AExtTools.getArgExternalInstance(startAt, 1, External_Buffer.class, Node.ACCESSVTYPE_MUTABLE_WRITELOCK)).getBuffer();
        Cipher cipher = Cipher.getInstance("Blowfish");
        cipher.init(Cipher.DECRYPT_MODE, secretKey);
        External_Buffer res = new External_Buffer();
        Buffer bu = new Buffer(cipher.doFinal(src.getArray()));
        res.setBuffer(bu);
        return Node.createExternal(res);
    }
View Full Code Here

   
    public Node external_to_buffer(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        Buffer buffer = new Buffer();
        buffer.write_bytes(number.get().toByteArray());
        External_Buffer res = new External_Buffer();
        res.setBuffer(buffer);
        return Node.createExternal(res);
    }
View Full Code Here

TOP

Related Classes of abstrasy.libraries.io.External_Buffer

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.