Package net.rim.device.api.crypto

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


            final ByteArrayOutputStream outputStream =
                    new ByteArrayOutputStream();

            // Create a block encryptor which will help us use the triple
            // des engine.
            final BlockEncryptor encryptor =
                    new BlockEncryptor(formatterEngine, outputStream);

            // Encrypt the actual data
            encryptor.write(text.getBytes());

            // Close the stream. This forces the extra bytes to be padded out if
            // there were not enough bytes to fill all of the blocks.
            encryptor.close();

            // Get the actual encrypted data
            final byte[] encryptedData = outputStream.toByteArray();

            // End of Encryption
View Full Code Here

TOP

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

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.