react-eimzo-solijonovmuhammadali
v1.2.5
Published
React va TypeScript ilovalarida raqamli imzolar bilan ishlash uchun oddiy paket.
Downloads
2,470
Maintainers
Readme
react-eimzo-solijonovmuhammadali
Ushbu hook e-imzo
kutubxonasidan foydalanish uchun mo'ljallangan. Hook yordamida foydalanuvchi sertifikatlari ro'yxatini olish va PKCS7 formatidagi raqamli imzoni yaratish imkoniyati mavjud.
O'rnatish
Avvaliga EIMZO
kutubxonasini o'rnatishingiz kerak bo'ladi. Bu faylni loyihangizga yuklab oling va kerakli joyga qo'ying.
Keyin useEImzo
hookini import qilib, foydalanishingiz mumkin:
import { useEImzo } from 'react-eimzo-solijonovmuhammadali'
Foydalanish
Sertifikatlarni olish
useEImzo
hookini ishlatganingizdan so'ng, sertifikatlar avtomatik ravishda yuklanadi va certificates
o'zgaruvchisida saqlanadi.
const { certificates } = useEImzo()
PKCS7 yaratish
Ma'lum bir sertifikat uchun PKCS7 raqamli imzosini yaratish uchun createPkcs7
funksiyasidan foydalanishingiz mumkin
const { createPkcs7 } = useEImzo()
const sertifikat = certificates[0] // birinchi sertifikatni olish misoli
createPkcs7(sertifikat)
PKCS7 formatidagi imzo pkcs7
o'zgaruvchisida saqlanadi:
const { pkcs7 } = useEImzo()
console.log(pkcs7)
Qanday muammolar yuzaga kelishi mumkin?
Agar E-imzo dasturi ishga tushmagan bo'lsa yoki noto'g'ri konfiguratsiya qilingan bo'lsa, konsolda "E-imzo ishga tushuring!" degan xatolik paydo bo'ladi.
Agar PKCS7 yaratishda xatolik yuzaga kelsa, "PKCS7 qilishda xotolik yuzberdi" xabari konsolda paydo bo'ladi.