public DHParameters(byte[] dhParamBytesArray) { try { readByteArray(new ByteArrayDataInputStream(dhParamBytesArray)); } catch (IOException e) { throw new IllegalArgumentException(e); } }
ByteArrayDataInputStream is = new ByteArrayDataInputStream(data); short skeyLen = is.readShort(); if (skeyLen <= 0) { byte[] encryptedData = is.readFully(data.length - 2); return crypt(key, encryptedData, false, cipherAlgorithm); } else { byte[] encodedSKeyData = is.readFully(skeyLen); byte[] encodedSKey = crypt(key, encodedSKeyData, false, cipherAlgorithm); byte[] encryptedData = is.readFully(data.length - 2 - skeyLen); com.kloudtek.kryptotek.Key sKey = readKey(symmetricAlgorithm.getKeyClass(), encodedSKey); return crypt(sKey, encryptedData, false, symmetricAlgorithmCipher);