Package org.rat.free.security.makifx.base.clear

Examples of org.rat.free.security.makifx.base.clear.ReadableRoot


            path += ExportSerializer.JSON_EXTENSION;
        }

        log("exportToJSON - path: " + path);

        final ReadableRoot readable = new ReadableRoot();
        readable.setKey(Utility.toUTF8String(GEN_KEY));
        readable.setProperties(key_secret_data.getProperties());
        readable.setSettings(getSettings());

        MAP_PLUGIN.forEach((key, plugin) -> {
            Readable rn = Readable.Create.instance();
            plugin.onReadableSavingData(rn);
            readable.getMap().put(key, rn);
        });

        ExportSerializer export_manager = LooB.get().fromStock(ExportSerializer.class);
        export_manager.toJSON(readable, path);
    }
View Full Code Here


            } else if (in.getName().endsWith(".json") || in.getName().endsWith(".JSON")) {

                try {

                    ExportSerializer export_manager = LooB.get().fromStock(ExportSerializer.class);
                    ReadableRoot readable = export_manager.toNode(in.toString());

                    String secret_key = readable.getKey();
                    if (secret_key == null || secret_key.length() == 0) {
                        throw new Exception("Invalid key in json file.");
                    }

                    KeySecretData ksd = new KeySecretData();
                    ksd.setKey(getUTF8Bytes(secret_key));
                    ksd.setProperties(new HashMap(readable.getProperties()));

                    ksd.encrypt(master_username, maki_file_key);

                    this.GEN_KEY = ksd.getKey();

                    enc_map = Login.firstEncyptedMap();

                    enc_map.setSettings(new HashMap(readable.getSettings()));

                    Map<String, Readable> map_read = readable.getMap();
                    Iterator<String> keys = map_read.keySet().iterator();

                    while (keys.hasNext()) {

                        String plugin_id = keys.next();
View Full Code Here

            path += ExportSerializer.JSON_EXTENSION;
        }

        log("exportToJSON - path: " + path);

        final ReadableRoot readable = new ReadableRoot();
        readable.setKey(UtilityFX.toUTF8String(GEN_KEY));
        readable.setProperties(key_secret_data.getProperties());
        readable.setSettings(getSettings());

        MAP_PLUGIN.forEach((key, plugin) -> {
            Readable rn = Readable.Create.instance();
            plugin.onReadableSavingData(rn);
            readable.getMap().put(key, rn);
        });

        ExportSerializer export_manager = MakiDI.get().fromStock(ExportSerializer.class);
        export_manager.toJSON(readable, path);
    }
View Full Code Here

            } else if (in.getName().endsWith(".json") || in.getName().endsWith(".JSON")) {

                try {

                    ExportSerializer export_manager = MakiDI.get().fromStock(ExportSerializer.class);
                    ReadableRoot readable = (ReadableRoot) export_manager.toNode(in.toString());

                    String secret_key = readable.getKey();
                    if (secret_key == null || secret_key.length() == 0) {
                        throw new Exception("Invalid key in json file.");
                    }

                    KeySecretData ksd = new KeySecretData();
                    ksd.setKey(getUTF8Bytes(secret_key));
                    ksd.setProperties(new HashMap(readable.getProperties()));

                    ksd.encrypt(master_username, maki_file_key);

                    this.GEN_KEY = ksd.getKey();

                    enc_map = Login.firstEncyptedMap(master_password);

                    enc_map.setSettings(new HashMap(readable.getSettings()));

                    Map<String, Readable> map_read = readable.getMap();
                    Iterator<String> keys = map_read.keySet().iterator();

                    while (keys.hasNext()) {

                        String plugin_id = keys.next();
View Full Code Here

            path += ExportSerializer.JSON_EXTENSION;
        }

        log("exportToJSON - path: " + path);

        final ReadableRoot readable = new ReadableRoot();
        readable.setKey(UtilityFX.toUTF8String(GEN_KEY));
        readable.setProperties(key_secret_data.getProperties());
        readable.setSettings(getSettings());

        MAP_PLUGIN.forEach((key, plugin) -> {
            Readable rn = Readable.Create.instance();
            plugin.onReadableSavingData(rn);
            readable.getMap().put(key, rn);
        });

        ExportSerializer export_manager = MakiDI.get().fromStock(ExportSerializer.class);
        export_manager.toJSON(readable, path);
    }
View Full Code Here

            } else if (in.getName().endsWith(".json") || in.getName().endsWith(".JSON")) {

                try {

                    ExportSerializer export_manager = MakiDI.get().fromStock(ExportSerializer.class);
                    ReadableRoot readable = (ReadableRoot) export_manager.toNode(in.toString());

                    String secret_key = readable.getKey();
                    if (secret_key == null || secret_key.length() == 0) {
                        throw new Exception("Invalid key in json file.");
                    }

                    KeySecretData ksd = new KeySecretData();
                    ksd.setKey(getUTF8Bytes(secret_key));
                    ksd.setProperties(new HashMap(readable.getProperties()));

                    ksd.encrypt(master_username, maki_file_key);

                    this.GEN_KEY = ksd.getKey();

                    enc_map = Login.firstEncyptedMap();

                    enc_map.setSettings(new HashMap(readable.getSettings()));

                    Map<String, Readable> map_read = readable.getMap();
                    Iterator<String> keys = map_read.keySet().iterator();

                    while (keys.hasNext()) {

                        String plugin_id = keys.next();
View Full Code Here

TOP

Related Classes of org.rat.free.security.makifx.base.clear.ReadableRoot

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.