code: public static Cipher getCipher(final @NotNull Key key, int mode) {
          try {
              Cipher cipher = Cipher.getInstance(key.getAlgorithm());
              cipher.init(mode, key);
              return cipher;
          } catch (NoSuchAlgorithmException | InvalidKeyException | NoSuchPaddingException e) {
              throw new RuntimeException(e);
          }
      }
docs: Creates a new Cipher
  @return Cipher implementation