EPassportLibrary
C# library to ease decoding/encoding/validation of ePassport data (certificates, face, fingerprint, etc..).
Install / Use
/learn @sylvain-prevost/EPassportLibraryREADME
ePassport Library
C# library leveraging BinaryNotes.NET to enable parsing/manipulation/encoding of MRTD security features (Passport certificates, picture/fingerprints Datagroups, etc).
<u>Example of use:</u>
using (FileStream fs = File.Open(filename, FileMode.Open))
{
byte[] data = new byte[fs.Length];
fs.Read(data, 0, data.Length);
ContentInfo contentInfo = Utils.DerDecode<ContentInfo>(data);
KnownOids oid = Oids.ParseKnown(contentInfo.ContentType.Value.Value);
if (oid == KnownOids.signedData)
{
SignedData signedData = Utils.DerDecode<SignedData>(contentInfo.Content);
// check if SignedData contains a cscaMasterList object
if (Oids.ParseKnown(signedData.EncapContentInfo.EContentType.Value.Value) == KnownOids.cscaMasterList)
{
// check the masterlist digest signature here
// ....
// now obtain the master list content
CscaMasterList cscaMasterList = Utils.DerDecode<CscaMasterList>(signedData.EncapContentInfo.EContent);
Console.WriteLine("number of certs present in cscaMasterList : " + cscaMasterList.CertList.Count);
foreach (Certificate certificate in cscaMasterList.CertList)
{
// .. do stuff ..
}
}
}
}
see examples folder for additional examples, including parsing and visualization of face & fingerprints.
</br> Output from examples. </br> </br> </br>
Related Skills
node-connect
341.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
