如何在 Dart 中编写字节数组?我想实现这个功能,但是里面有Java代码byte[]。它也可以用 Dart 编写吗?
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);
}
}
Run Code Online (Sandbox Code Playgroud)