Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@cnhis-frontend/signature
Advanced tools
手写板签名对接 sdk
import SignatureSDK from '@cnhis-frontend/signature'
// 创建签名实例,注意,重复创建也只会返回上一个实例对象
// 捷宇
const signatureSdk = SignatureSDK.create()
const { signImage, fingerImage, signXml, mixImage, signFileStr } =
await signatureSdk.start(option)
/* option类型为undefined | {
strokeWidth?: number; 签名线条粗细值,默认值 3
pdfPath?: string; 预览目标pdf文件路径
xmlPath?: string; xml文件生成路径,
location?: string; 签名或者指纹的位置,一个签名或指纹标准格式为Type.Page.X.Y,默认值 '2.1.100.100'
Type---------0为签名,1为指纹,2为指纹加签名
Page---------表示页码
X-------------坐标位置
Y-------------坐标位置
(比如只有一个签名时表示“0.1.100.100”)多个位置时用 “|”分隔符
voiceStr?: string; 播放的提示语,默认值 '请签名'
ifPreview?: number; 只签名或者签名 pdf 文件,2 为签名 pdf 文件, 1 为预览 pdf文件,0 为只签名或者只按指纹,此时 PDFPath 可以为空,默认值 0
} */
// 天谷
const signatureSdk = SignatureSDK.create({ name: 'tiangu' })
const { signImage } = await signatureSdk.start('sign')
const { fingerImage } = await signatureSdk.start('finger')
// 河北腾翔(signImage包含了手写签名和指纹)
const signatureSdk = SignatureSDK.create({ name: 'tengxiang' })
const { signImage } = await signatureSdk.start(option)
/* option类型为undefined | {
content?: string; 签名原文,默认为空
zoomSize?: number; (0 – 100)表示输入图案为原图的百分比,0表示不缩放,默认25
} */
// 河北腾翔3.0(signImage包含了手写签名和指纹)
const signatureSdk = SignatureSDK.create({ name: 'tengxiang', version: 3 })
const { signImage } = await signatureSdk.start(option)
/* option类型为 {
id?: string | number; 业务系统自定义字段,可以定义多个,证信签不对其进行处理,签字完成时一并返回
reason?: string; 签字确认文字
title?: string; 标题
content?: string; type为html时为网页源码(源码的双引号用单引号替换,其它不变),type为text的时候为string字符串(可传入有效url)
source: string; 待签原文,PC传递给证信签,用于签名
type?: 'text' | 'html' | 'htmlB64'; 默认值为text
} */
// 销毁实例,执行后可使用SignatureSDK.create()创建一个新实例
SignatureSDK.destroy()
FAQs
手写板签名对接 sdk
We found that @cnhis-frontend/signature demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.