docs: public OutputStream encrypt(OutputStream destination, SecretKey key) throws IOException {
  
          // Basic null check.
          // An empty stream can be encrypted:
          if (destination == null) {
              return null;
          }
  
          Cipher cipher = getCipher();
  
          // Generate an initialisation vector:
          byte[] iv = Generate.byteArray(getIvSize(cipher));
  
          // Get a cipher instance and instantiate the CipherOutputStream:
          initCipher(cipher, Cipher.ENCRYPT_MODE, key, iv);
          CipherOutputStream cipherOutputStream = new CipherOutputStream(destination, cipher);
  
          // The IV can be stored unencrypted at the start of the
          // stream:
          destination.write(iv);
  
          // Return the initialised stream:
          return cipherOutputStream;
      }