Package net.rim.device.api.crypto

Examples of net.rim.device.api.crypto.BlockDecryptor


            final ByteArrayInputStream inputStream =
                    new ByteArrayInputStream(encryptedData);

            // Create the block decryptor passing in the unformatter engine and
            // the encrypted data.
            final BlockDecryptor decryptor =
                    new BlockDecryptor(unformatterEngine, inputStream);

            // Now we want to read from the stream. We are going to read the
            // data 10 bytes at a time and then add the new data to the
            // decryptedData array. It is important to note that for
            // efficiency one would most likely want to use a larger
            // value than 10. We use a small value so that we can
            // demonstrate several iterations through the loop.
            final byte[] temp = new byte[10];
            final DataBuffer db = new DataBuffer();

            for (;;) {
                final int bytesRead = decryptor.read(temp);

                if (bytesRead <= 0) {
                    // We have run out of information to read, bail out of loop
                    break;
                }
View Full Code Here

TOP

Related Classes of net.rim.device.api.crypto.BlockDecryptor

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.