Digital Travel Credentials Reprocessing
Find out more about Digital Travel Credentials.
For starting the DTC reprocessing:
1. Create a configuration object and pass DTC data there:
let config = DocReader.RecognizeConfig(scenario: RGL_SCENARIO_DTC)
if let fileURL = Bundle.main.url(forResource: "dtc", withExtension: "dat") {
config.dtc = try? Data(contentsOf: fileURL)
}
RGLRecognizeConfig *config = [[RGLRecognizeConfig alloc] initWithScenario:RGL_SCENARIO_DTC];
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"dtc" ofType:@"dat"];
config.dtc = [NSData dataWithContentsOfFile:filePath];
val recognizeConfig = RecognizeConfig.Builder(Scenario.SCENARIO_DTC)
.setDTC(dtcBuffer)
.build()
RecognizeConfig recognizeConfig = new RecognizeConfig.Builder(Scenario.SCENARIO_DTC)
.setDTC(dtcBuffer)
.build();
var config = RecognizeConfig.withScenario(
Scenario.DTC,
RecognizeData.withImage(image),
);
config.dtc = dtc;
var config = new RecognizeConfig()
config.scenario = ScenarioIdentifier.SCENARIO_DTC
config.dtc = dtc
var config = new RecognizeConfig()
config.scenario = ScenarioIdentifier.SCENARIO_DTC
config.dtc = dtc
var config = new RecognizeConfig()
config.scenario = ScenarioIdentifier.SCENARIO_DTC
config.dtc = dtc
// Android
RecognizeConfig config = new RecognizeConfig.Builder(Scenario.ScenarioDtc).SetDtc(dtcBuffer).Build();
// iOS
RGLRecognizeConfig config = new(data)
{
Scenario = Constants.RGL_SCENARIO_DTC
Dtc = myDtc
};
2. Start document processing:
DocReader.shared.recognize(config:config) {}
[RGLDocReader.shared recognizeWithConfig:config completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {}];
DocumentReader.Instance().recognize(recognizeConfig, completion)
DocumentReader.Instance().recognize(recognizeConfig, completion);
DocumentReader.instance.recognize(config, completion);
DocumentReader.recognize(config, _ => { }, _ => { })
DocumentReader.recognize(config).subscribe(m => {
// completion
})
DocumentReader.recognize(config, function(m) {
// completion
}, function(e) { })
// Android
DocumentReader.Instance().Recognize(Platform.AppContext, config, this);
// iOS
RGLDocReader.Shared.RecognizeWithConfig(config, completion);
3. Discover the reprocessing results in the response. In the RFIDSessionData
find the applications
array the object with type
equal to 8
:
Generate DTC-VC
With the help of Regula Document Reader SDK, you can generate a DTC-VC, and use it for the reprocessing.
To generate a DTC-VC, follow these steps:
1. Enable the generateDTCVC
property:
DocReader.shared.processParams.generateDTCVC = true
[RGLDocReader shared].processParams.generateDTCVC = @YES;
DocumentReader.Instance().processParams().generateDTCVC = true
DocumentReader.Instance().processParams().generateDTCVC = true;
DocumentReader.instance.processParams.generateDTCVC = true;
DocumentReader.setProcessParams({
generateDTCVC: true,
}, (str) => { console.log(str) }, (error) => { console.log(error) });
DocumentReader.setProcessParams({
generateDTCVC: true
});
DocumentReader.setProcessParams({
generateDTCVC: true,
}, function (m) { }, function (e) { console.log(e); });
// Android
DocumentReader.Instance().ProcessParams().generateDTCVC = (Java.Lang.Boolean)true;
// iOS
RGLDocReader.Shared.ProcessParams.GenerateDTCVC = true;
2. Start the document processing.
3. Start the RFID chip processing.
4. Find in the response dtcData
field that stores the generated DTC-VC.