Changes between Version 17 and Version 18 of actividades_2018_pruebas


Ignore:
Timestamp:
May 31, 2018, 9:20:19 AM (6 years ago)
Author:
pbuitrago
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • actividades_2018_pruebas

    v17 v18  
    598598Para este caso, como obtuvimos el certificado del firmarte y la clave privada con la librería forge en la función ''getCertificate'', necesitamos importar la clave privada para que pueda ser utilizada por la librería ''Crypto''
    599599
    600 {{{function importCryptoKeyPkcs8(privateKey,extractable)
     600{{{
     601function importCryptoKeyPkcs8(privateKey,extractable)
    601602        {
    602603        var privateKeyInfoDerBuff = privateKeyToPkcs8(privateKey);
     
    614615La función ''privateKeyToPkcs8'' transforma la clave priva en formato ''pkcs8''
    615616
    616 {{{function privateKeyToPkcs8(privateKey)
     617{{{
     618function privateKeyToPkcs8(privateKey)
    617619        {
    618620        var rsaPrivateKey = forge.pki.privateKeyToAsn1(privateKey);
     
    628630 se usara esta función para enviarlo al servidor Murachí y completar la firma electrónica.
    629631
    630 {{{function SingHash()
     632{{{
     633function SingHash()
    631634        {
    632635        console.log("*.... SingFile ....*");
     
    660663Código de la función javaScript "SignFilePDF()" sección 3:
    661664
    662 {{{document.getElementById("seccion2").innerHTML = responseString;
     665{{{
     666document.getElementById("seccion2").innerHTML = responseString;
    663667var json_x = data;
    664668var hash = json_x['hash'];