Contact QR code

Hello,
I’ve seen some contact editors support generation of QR code from the contact.
There’s Aspose BarCode which seems support QR code generation, but what should be passed to it as the source data?
For Vcf, shall I read the whole file like File.ReadAllText ? If so, what if it’s a multi contact vcf or has large attachments etc…
And what happens in the case of Msg with Contact class?
Need a generic idea on how to proceed :slight_smile:

Hello,
I’m not very experienced with QR codes, but I can offer some thoughts. For more detailed info, I suggest contact the Aspose.BarCode forum.

If you have a VCF file with a single contact, you can generate a QR code using the entire VCF content. However, if the VCF contains multiple contacts, it’s better to create individual QR codes for each contact.

Note that large attachments shouldn’t be included in a QR code since they’re not practical to encode and decode. Instead, focus on the essential contact info.

For MSG files with Contact class, you’ll need to convert them to a vCard before creating a QR code.

In my view, QR codes have a limited capacity, which makes them inefficient for large files due to this restriction.

1 Like

Thank you very much for the valuable info, I’ll refer them, just a side quick question.
When signing MailMessage or MapiMessage, how to choose between clear signed or opaque signed method?
Please note that am not going to encrypt, sign only.
Best :slight_smile:

And when Message.IsSigned = True, how to find if it’s clear signed or opaque signed? Thanks.

Hi @australian.dev.nerds
Here is a clear explanation in our opinion of the differences between clear signing (Detached in S/MIME) and opaque signing(Attached or NotDetached in S/MIME).

https://docs.oracle.com/cd/E19398-01/820-1228/gfnmj/index.html

This can be done using the Detached parameter of the SinatureOptions class.

For example, this method creates a signed message with a signature of type Detached(clear signing)

MapiMessage signedDetached = new SecureEmailManager().AttachSignature(msg, privateCert, new SignatureOptions() { Detached = true });

and this method creates a signed message with a signature of type NotDetached (opaque signing)

MapiMessage signedNotDetached = new SecureEmailManager().AttachSignature(msg, privateCert, new SignatureOptions() { Detached = false });

We did not implement this feature, but you can check:
MapiMessage.MessageClass = IPM.Note.SMIME.MultipartSigned - ClearSigned(Detached)
MapiMessage.MessageClass = IPM.Note.SMIME - OpaqueSigned(NotDetached)

string contentType = MailMessage.Headers.Get(“Content-Type”);
contentType.Contains(“multipart/signed”)- ClearSigned(Detached)
contentType.Contains(“application/pkcs7-mime”)- OpaqueSigned(NotDetached)