Can anyone help in get binance signature using flutter (dart language)?
I’m using the following code but it doesn’t work
int timeStamp = DateTime.now().millisecondsSinceEpoch;
String queryParams = 'timestamp=' + timeStamp.toString();
List<int> key = convert.utf8.encode(this.apiSecret);
crypto.Hmac hmac = new crypto.Hmac(crypto.sha256, key);
List<int> messageBytes = convert.utf8.encode(queryParams);
crypto.Digest digest = hmac.convert(messageBytes);
String signature = hex.encode(digest.bytes);