rsaSign method

Uint8List rsaSign(
  1. List<int> data
)

Implementation

Uint8List rsaSign(List<int> data) {
  final digest = sha512.hashSync(data);
  const hashAlgorithm = HashAlgorithm.sha512;
  final digestInfo = [
    0x30,
    0x51,
    0x30,
    0x0D,
    0x06,
    hashAlgorithm.oid.length,
    ...(hashAlgorithm.oid),
    0x05,
    0x00,
    0x04,
    0x40,
    ...digest.bytes
  ];
  return _toApdu(
      0x00, Instruction.performSecurityOperation, 0x9E, 0x9A, digestInfo);
}