docs: private Cipher getCipher(int mode, Key key) {
  
          if (cipher == null) {
  
              try {
  
                  // Get a Cipher instance:
                  cipher = Cipher.getInstance(cipherName);
  
              } catch (NoSuchAlgorithmException e) {
                  if (SecurityProvider.addProvider()) {
                      cipher = getCipher(mode, key);
                  } else {
                      throw new IllegalStateException("Algorithm unavailable: " + cipherName, e);
                  }
              } catch (NoSuchPaddingException e) {
                  throw new IllegalStateException("Padding method unavailable: " + cipherName, e);
              }
          }
  
          // Initialise the Cipher
          try {
              cipher.init(mode, key);
          } catch (InvalidKeyException e) {
              throw new IllegalArgumentException("Invalid key used to initialise cipher.", e);
          }
  
          return cipher;
      }