getSigningCertificate static method

Future<List<int>> getSigningCertificate(
  1. String password
)

Implementation

static Future<List<int>> getSigningCertificate(String password) async {
  // SELECT FILE 公的個人認証AP
  var selectFile = await FlutterNfcMynumber.transceive(
      Uint8List.fromList(MynumberCommand.commandSelectFile));
  commandResultCheck(selectFile);

  // SELECT FILE 認証用PIN
  var selectFileAuthPin = await FlutterNfcMynumber.transceive(
      Uint8List.fromList(MynumberCommand.commandSelectFilePinSync));
  commandResultCheck(selectFileAuthPin);

  // VERIFY 認証用PIN
  var verifyUserCertificationResult = await FlutterNfcMynumber.transceive(
      Uint8List.fromList(commandSignaturePin(password.codeUnits)));
  commandResultCheck(verifyUserCertificationResult,
      MynumberCommandError.WRONG_SIGNATURE_PASSWORD);

  // SELECT FILE CERT
  var selectFileCertResult = await FlutterNfcMynumber.transceive(
      Uint8List.fromList(MynumberCommand.commandSelectFileCert));
  commandResultCheck(selectFileCertResult);

  // READ BINARY
  return await readBinary();
}