Package com.afewmoreamps.util

Examples of com.afewmoreamps.util.Entropy


        Set<byte[]> keySet = new TreeSet<byte[]>(new ByteArrayLexOrder());
        List<byte[]> keys = new ArrayList<byte[]>(keyCount);
        List<byte[]> values = new ArrayList<byte[]>(keyCount);

        Entropy entropy = new Entropy(entropyQuality, seed);
        ArrayList<ListenableFuture<?>> results = new ArrayList<ListenableFuture<?>>(keyCount);
        for (int ii = 0; ii < keyCount; ii++) {
            byte key[] = new byte[keySize];
            do {
                r.nextBytes(key);
            }
            while (!keySet.add(key));
            keys.add(key);
            byte value[] = entropy.get(valueSize);
            values.add(value);
            results.add(jc.put(key, value));
        }

        for (Future<?> f : results) {
View Full Code Here

TOP

Related Classes of com.afewmoreamps.util.Entropy

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.