title: How can I write byte array in Dart?
body: <p>How do I write a byte array in Dart? I want to implement this function, but it is Java code with <code>byte[]</code> in it. Can it be written in Dart as well?</p>
  
  <pre><code>public static byte[] encrypt(byte[] key, byte[] data) throws Exception {
      try {
          return performCipher(Cipher.ENCRYPT_MODE, key, data);
      } catch (Exception e) {
          throw new Exception(e);
      }
  }
  </code></pre>