decryptBinary method

  1. @override
BuBytes decryptBinary({
  1. required List<int> key,
  2. required List<int> ct,
  3. List<int> tweak = const [],
})
override

Decrypts raw bytes ct (binary radix-2 FF1) with 16, 24 or 32-byte key and tweak. Returns same-length plaintext. Throws on bad key or empty ct.

Implementation

@override
BuBytes decryptBinary({
  required List<int> key,
  required List<int> ct,
  List<int> tweak = const [],
}) {
  final ff1 = FF1Binary(aes: blockCipherApi.aes(key));
  final dec = ff1.decrypt(BinaryNumeralString(ct), tweak: tweak);
  return dec.data;
}