public TransportConnection(InputStream is, OutputStream os, SecureRandom rnd) { this.cis = new CipherInputStream(new NullCipher(), is); this.cos = new CipherOutputStream(new NullCipher(), os); this.rnd = rnd; }
public static void checkCipherList(String[] cipherCandidates) { for (int i = 0; i < cipherCandidates.length; i++) getEntry(cipherCandidates[i]); }
public void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff) { if (doEncrypt) encryptBlock(src, srcoff, dst, dstoff); else decryptBlock(src, srcoff, dst, dstoff); } }
public void changeCipher(BlockCipher bc) { this.currentCipher = bc; blockSize = bc.getBlockSize(); buffer = new byte[blockSize]; enc = new byte[blockSize]; pos = blockSize; }
public void transformBlock(byte[] src, int srcoff, byte[] dst, int dstoff) { processBlock(src, srcoff, dst, dstoff); } }
public CipherOutputStream(BlockCipher tc, OutputStream bo) { this.bo = bo; changeCipher(tc); }
public void write(int b) throws IOException { buffer[pos++] = (byte) b; if (pos >= blockSize) writeBlock(); }
/** * Unless you know what you are doing, you will never need this. * * @return The list of supported cipher algorithms by this implementation. */ public static synchronized String[] getAvailableCiphers() { return BlockCipherFactory.getDefaultCipherList(); }
public CipherInputStream(BlockCipher tc, InputStream bi) { this.bi = bi; changeCipher(tc); }
public TransportConnection(InputStream is, OutputStream os, SecureRandom rnd) { this.cis = new CipherInputStream(new NullCipher(), is); this.cos = new CipherOutputStream(new NullCipher(), os); this.rnd = rnd; }
public static void checkCipherList(String[] cipherCandidates) { for (int i = 0; i < cipherCandidates.length; i++) getEntry(cipherCandidates[i]); }
public void changeCipher(BlockCipher bc) { this.currentCipher = bc; blockSize = bc.getBlockSize(); buffer = new byte[blockSize]; enc = new byte[blockSize]; pos = 0; }
public TransportConnection(InputStream is, OutputStream os, SecureRandom rnd) { this.cis = new CipherInputStream(new NullCipher(), is); this.cos = new CipherOutputStream(new NullCipher(), os); this.rnd = rnd; }
public static int getBlockSize(String type) { CipherEntry ce = getEntry(type); return ce.blocksize; }
public void changeCipher(BlockCipher bc) { this.currentCipher = bc; blockSize = bc.getBlockSize(); buffer = new byte[blockSize]; enc = new byte[blockSize]; pos = 0; }
public static int getKeySize(String type) { CipherEntry ce = getEntry(type); return ce.keysize; } }
public static int getBlockSize(String type) { CipherEntry ce = getEntry(type); return ce.blocksize; }
public static int getKeySize(String type) { CipherEntry ce = getEntry(type); return ce.keysize; } }