Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
¿Cómo usar la firma digital en jsrsasign.js con caracteres chinos?

Necesito interactuar con organizaciones de terceros. Deben agregar una firma digital a los datos y colocarla en el encabezado de la solicitud.

Descubrí que jsrsasign.js podría ser útil, así que lo estoy usando para hacer la firma digital, pero siempre con un resultado incorrecto.

ingrese la descripción de la imagen aquí

mi código:

 import { RSAKey, KEYUTIL, KJUR, hex2b64 } from 'jsrsasign' export function signature (url) { // 创建RSAKey对象var rsa = new RSAKey() let k = '-----BEGIN PRIVATE KEY-----x-----END PRIVATE KEY-----' // 将密钥转码rsa = KEYUTIL.getKey(k) // 创建Signature对象,设置签名编码算法var sig = new KJUR.crypto.Signature({'alg': 'SHA256withRSA'}) // 初始化sig.init(rsa) console.log('***url***', url) // 传入待加密字符串sig.updateString(url) // 生成密文var sign = hex2b64(sig.sign()) console.log('**sign**', sign) return sign }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Soy un mantenedor de jsrsasign. Funcionará si su código o página está en UTF-8 aunque sean caracteres chinos, cirílicos o japoneses.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!