PassportAP

@available(iOS 13.0, *)
public class PassportAP : NSObject

PassportAPはパスポートAPを操作するクラスです。

  • コンストラクタ

    Declaration

    Swift

    @objc
    public init(_ reader: JeidReader)

    Parameters

    reader

    JeidReaderインスタンス

  • Basic Access Control (BAC)用の鍵交換を行います

    Throws

    鍵交換に失敗した場合、エラーがスローされます

    Declaration

    Swift

    @objc
    public func startBAC(_ epKey: EPKey) throws

    Parameters

    epKey

    パスポート番号、生年月日、有効期限から作成したEPKeyオブジェクト

  • パスポートAP内のすべてのデータを読み出します

    Throws

    読み出しに失敗した場合、エラーがスローされます

    Declaration

    Swift

    @objc
    public func readFiles() throws -> EPFiles

    Return Value

    在留カードAP内のすべてのデータ

  • Active Authenticationを行います。

    Throws

    認証中に発生したエラーがスローされます

    Note

    Active Authenticationをサポートしないパスポートの場合はJeidError.fileNotFound(message:)がスローされます

    Note

    無償版の場合はJeidError.unsupportedOperation(message:)がスローされます

    Declaration

    Swift

    public func activeAuthentication(_ files: EPFiles) throws -> Bool

    Parameters

    files

    EPFilesオブジェクト

    Return Value

    認証に成功した場合はtrue、そうでない場合はfalse