/** * Constructs a {@link CtrCryptoOutputStream}. * * @param props The <code>Properties</code> class represents a set of * properties. * @param out the WritableByteChannel instance. * @param key crypto key for the cipher. * @param iv Initialization vector for the cipher. * @param streamOffset the start offset in the data. * @throws IOException if an I/O error occurs. */ public CtrCryptoOutputStream(Properties props, WritableByteChannel out, byte[] key, byte[] iv, long streamOffset) throws IOException { this(out, Utils.getCipherInstance( "AES/CTR/NoPadding", props), CryptoInputStream.getBufferSize(props), key, iv, streamOffset); }
/** * Constructs a {@link PositionedCryptoInputStream}. * * @param props The <code>Properties</code> class represents a set of * properties. * @param in the input data. * @param key crypto key for the cipher. * @param iv Initialization vector for the cipher. * @param streamOffset the start offset in the data. * @throws IOException if an I/O error occurs. */ public PositionedCryptoInputStream(Properties props, Input in, byte[] key, byte[] iv, long streamOffset) throws IOException { this(props, in, Utils.getCipherInstance("AES/CTR/NoPadding", props), CryptoInputStream.getBufferSize(props), key, iv, streamOffset); }
/** * Constructs a {@link CryptoInputStream}. * * @param transformation the name of the transformation, e.g., * <i>AES/CBC/PKCS5Padding</i>. * See the Java Cryptography Architecture Standard Algorithm Name Documentation * for information about standard transformation names. * @param props The <code>Properties</code> class represents a set of * properties. * @param in the ReadableByteChannel object. * @param key crypto key for the cipher. * @param params the algorithm parameters. * @throws IOException if an I/O error occurs. */ public CryptoInputStream(String transformation, Properties props, ReadableByteChannel in, Key key, AlgorithmParameterSpec params) throws IOException { this(in, Utils.getCipherInstance(transformation, props), CryptoInputStream .getBufferSize(props), key, params); }
/** * Constructs a {@link CtrCryptoOutputStream}. * * @param props The <code>Properties</code> class represents a set of * properties. * @param out the output stream. * @param key crypto key for the cipher. * @param iv Initialization vector for the cipher. * @param streamOffset the start offset in the data. * @throws IOException if an I/O error occurs. */ public CtrCryptoOutputStream(Properties props, OutputStream out, byte[] key, byte[] iv, long streamOffset) throws IOException { this(out, Utils.getCipherInstance( "AES/CTR/NoPadding", props), CryptoInputStream.getBufferSize(props), key, iv, streamOffset); }
/** * Constructs a {@link CtrCryptoInputStream}. * * @param props The <code>Properties</code> class represents a set of * properties. * @param in the InputStream instance. * @param key crypto key for the cipher. * @param iv Initialization vector for the cipher. * @param streamOffset the start offset in the stream. * @throws IOException if an I/O error occurs. */ public CtrCryptoInputStream(Properties props, InputStream in, byte[] key, byte[] iv, long streamOffset) throws IOException { this(in, Utils.getCipherInstance( "AES/CTR/NoPadding", props), CryptoInputStream.getBufferSize(props), key, iv, streamOffset); }
/** * Constructs a {@link CtrCryptoInputStream}. * * @param props The <code>Properties</code> class represents a set of * properties. * @param in the ReadableByteChannel instance. * @param key crypto key for the cipher. * @param iv Initialization vector for the cipher. * @param streamOffset the start offset in the stream. * @throws IOException if an I/O error occurs. */ public CtrCryptoInputStream(Properties props, ReadableByteChannel in, byte[] key, byte[] iv, long streamOffset) throws IOException { this(in, Utils.getCipherInstance( "AES/CTR/NoPadding", props), CryptoInputStream.getBufferSize(props), key, iv, streamOffset); }
/** * Constructs a {@link CryptoOutputStream}. * * @param transformation the name of the transformation, e.g., * <i>AES/CBC/PKCS5Padding</i>. * See the Java Cryptography Architecture Standard Algorithm Name Documentation * for information about standard transformation names. * @param props The <code>Properties</code> class represents a set of * properties. * @param out the WritableByteChannel instance. * @param key crypto key for the cipher. * @param params the algorithm parameters. * @throws IOException if an I/O error occurs. */ public CryptoOutputStream(String transformation, Properties props, WritableByteChannel out, Key key, AlgorithmParameterSpec params) throws IOException { this(out, Utils.getCipherInstance(transformation, props), CryptoInputStream .getBufferSize(props), key, params); }
/** * Constructs a {@link CryptoOutputStream}. * * @param transformation the name of the transformation, e.g., * <i>AES/CBC/PKCS5Padding</i>. * See the Java Cryptography Architecture Standard Algorithm Name Documentation * for information about standard transformation names. * @param props The <code>Properties</code> class represents a set of * properties. * @param out the output stream. * @param key crypto key for the cipher. * @param params the algorithm parameters. * @throws IOException if an I/O error occurs. */ public CryptoOutputStream(String transformation, Properties props, OutputStream out, Key key, AlgorithmParameterSpec params) throws IOException { this(out, Utils.getCipherInstance(transformation, props), CryptoInputStream.getBufferSize(props), key, params); }
/** * Constructs a {@link CryptoInputStream}. * * @param transformation the name of the transformation, e.g., * <i>AES/CBC/PKCS5Padding</i>. * See the Java Cryptography Architecture Standard Algorithm Name Documentation * for information about standard transformation names. * @param props The <code>Properties</code> class represents a set of * properties. * @param in the input stream. * @param key crypto key for the cipher. * @param params the algorithm parameters. * @throws IOException if an I/O error occurs. */ public CryptoInputStream(String transformation, Properties props, InputStream in, Key key, AlgorithmParameterSpec params) throws IOException { this(in, Utils.getCipherInstance(transformation, props), CryptoInputStream.getBufferSize(props), key, params); }