Basic Electronic Signature (BES) format is supported on iOS devices.
plist
file. (“iTunes file sharing” to reach files under Documents
folder from iTunes and for the card reader access “external accessory”)Documents
folder of the application.license.dat
.Documents
folder using iTunes, but before that iTunes file sharing
must be activated in plist
file.NSThread
class reference of iOS library from Apple.
[NSThread detachNewThreadSelector:@selector(login:) toTarget:(id)self withObject:nil];
SmartCardManager smartCardManager;
smartCardManager.openSession();
ECertificate cert = smartCardManager.getSignatureCertificate();
Container
object is created to encapsulate the signature object.
SignatureContainer *container = new CMSContainer();
Signature
object is created using the certificate retrieved before.
Signature *signature = container->createSignature(cert);
Signature
object. Also whether the content is placed in the signature is determined by boolean value passed to addContent
function.
Signable *data = new SignableBytes(dataBytes); signature->addContent(data, true);
Signer
object, which will do signing, is generated by giving PIN of smart card and certificate.
BaseSigner *signer = smartCardManager.getSigner("12345", cert);
sign
function is called.
signature->sign(signer);