Bu, dökümanın eski bir sürümüdür!
You can find the class SmartCardManager
in the sample codes section of the distributed package. This class is published as open source in order for you to customize it according to your own needs. Basic signature operations can be performed by this class which has the following functions:
Örnek bir kullanım aşağıdaki gibi olabilir.
//Enable APDU usage SmartCardManager.useAPDU(true); //Connect a smartcard. If more than one smart card connected, user selects one of them SmartCardManager scm = SmartCardManager.getInstance(); //Get qualified certificate. If more than one qualified certificate, user selects one of them. ECertificate cert = scm.getSignatureCertificate(true, false); //Create signer BaseSignersigner = scm.getSigner("12345", cert); /** * Create signature */ //If not sign again with selected card logout. scm.logout(); //To select new card and new certificate, call reset. scm.reset();
Yeni bir kartın takılıp takılmadığı ve seçili kartın çıkartılıp çıkartılmadığı getInstance()
methodu içinde kontrol edilmektedir. Her imzalama işleminden önce SmartCardManager
nesnesini getInstance()
methodu ile alınız. Yukarıdaki örnek kodda işlemler kısa zamanda ardışık olarak yapıldığından nesne bir kere alınmış ve o nesne üzerinden işlem yapılmıştır.