Firmar con COPICOM RSA SHA256

Firmar con COPICOM RSA SHA256

Postby acuellar » Fri Jun 09, 2023 11:09 pm

Buenas estimados

Estoy intentando firmar un xml con COPICOM de Microsoft
Descargar de aquí https://wwws.prodemge.gov.br/component/phocadownload/category/26-capicom
Instalar, luego ejecutar CMD como administrador y ejecutar el siguiente comando para registrar COPICOM.DLL

C:\Windows\system32>regsvr32 “C:\Program Files\Microsoft CAPICOM 2.1.0.2 SDK\Lib\X86\capicom.dll”

Con éste código
Code: Select all  Expand view  RUN

#include "FiveWin.ch"

Function Main()
 LOCAL ctx,cPrivateKey:= cSignXml:= encrypted:="",cTexto, cSignatureValue, cDigestValue, cPublicKey

#pragma __cstream|cPrivateKey:=%s
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEArguSG5QZ8OeX3NynUh15jxT9SHf0F854Qml+GzzDkAWV3bu1
rzpU9HBG34RYiWVRaM7032WAzpXwpjLSWOvpCooSU7UKKaeXJ85ZSVtcbXLx1nRi
PvCdXwpZesCyu9fLTASECEpLUv2f14te5pV+4w7JUlfv7Cg8hr8R0kMCsGwir6TP
XOaXLFe7bGIz/wXGfw4Wh3MuD399JwkijPnZo3aLvnSBOrBYgdpYFQDAvpEKO0fk
DeWSoxg2kvt9H//04zTSTlD0frSnvhjy4KoCor7zAybjlr7mOis0SckAId3q8pF/
wxV0xHDEzes1MuHj+ANj2p5kRYh+TFQJYGQB7QIDAQABAoIBABd0ILbNsOc5Vkoh
g/y5Uxm4ct9SptaUcLlGXQOPnyzny8fLFVMtMaiU/r/9Ji8xs5RDm1UFaSOtqfXD
kHwCIm/Upl6YXWu6lVB8aqTLhnuLS1KicWDY7OQTUXaMxCkzDcbLLv2tAVSIMAOM
WPgKukQfyHprtj2lOG7SDbU/aXvbhbTGD5bKBrcau2e7pcXNrMwXuujxrs3e6Iyl
H/F8o7p4RHI7lPc/uv/65ehFeFZIBUZNbk+lMo+b7GLDbu56DcowKe54bkuH5tf4
SX8Ud4kUkyCbVLT+5Eub0JNlYqVnTkpypj3Il1WjVXvkuOGRlmKCgT2qe+z1VImo
13Obf5ECgYEA1wN2EERlJefpDwpZUJfabGr1/+HZS5zlkXSLk3rrT0XI5achHaHl
AlbPmWba6Hq4hq+nMBV54tBTwgEpvSTRcfM74NVY1Y1y7C4uvtJLxBHfcVTMkDeC
MWqeeeBI3k9f78TLHTt5qAL0tccgaVaQIMHaobdyFeUExRdl/2+NMZkCgYEAzzjg
5BZxt3/Xzzn8yTbr9/MBJSKp2WqnEZT2RfYyn41n4RDCY7txVrou97FtS4K5FxSk
37W029/4tG/3s/RBEeyJ7vnKxvtlhVwj2GNcCbxHM7q3kXevV48fYiAqBkpiZO5a
ULgUeEuLpnaap7v0xetGLExBfjyIuU76cS4Tb3UCgYEApSYRbxk5n83rYxQN2itp
J9FYNjyhDMTsR7b+5j6Jsw/k6RBgDUSmhA9t0WQBTIPGbB1LC1HTlvVxABiomJFJ
Fn8/RMhaPV0yIlquqP8aFvWrbH83yKX6KD6+jtpI3giVpbLAWCmwne33TBAwwvgs
KBz98yzWQh7wdPot6+8gwjECgYAt6gNiZlqx9uChaM7K4qFsIeq6CLErnEcCTUg3
/jH/SjyfELCRmoGlXsFzXlvCJGfQZmGVs9Qr97dKe5idxdv5FbkGO1CjwCYhY2YJ
1xIYkiAQpSlxUNyIAQ1KF6hYFnkwteNLCU53zP1XV+YyjiHRDK1SuV61ksIUlRxG
oZfq1QKBgQCMqD/JOmfE+Kb1o5HwsRpbjhboux0UltUqx3WU0iOb36sfEo+W3AsV
ZbMOu2HGJFqLe7edORx7a/ztmuhNkEUBJXh8wc2zUvhhw80eOv32tWIAwkQQ0+Rs
1f9JmziEDr+szcAWjPCb5SWpGG46XsE0z1IwGXrHUC68eAIb0wA/Qw==
-----END RSA PRIVATE KEY-----
#pragma __endtext
*
#pragma __cstream|cSignXml:=%s
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
            <CanonicalizationMethod
                    Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
            <SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
            <Reference URI="">
                <Transforms>
                    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform>
                    <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"></Transform>
                </Transforms>
                <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
                <DigestValue>V7cTT+m5Xdb5ViNzHVzEe4LtJFF1WO/tWrlzUZiyRlI=</DigestValue>
            </Reference>
        </SignedInfo>
        <SignatureValue>
        </SignatureValue>
        <KeyInfo>
            <X509Data>
                <X509Certificate>
                </X509Certificate>
            </X509Data>
        </KeyInfo>
    </Signature>
#pragma __endtext
 
     cDigestValue    := CapicomClass():HashData( cSignXml )
     cSignatureValue := CapicomClass():Sign( cDigestValue, , , @cPrivateKey )
     
       ? cDigestValue
   ? cSignatureValue
   ? cDigestValue == CapicomClass():VerifySignature( cSignatureValue )
   ? IsValidSignatureCapicom( cDigestValue, cSignatureValue )
   ? cPublicKey
     
Return Nil
*
FUNCTION IsValidSignatureCapicom( cDigestValue, cSignatureValue )
     
       IF cDigestValue = NIL .OR. cSignatureValue = NIL
          RETURN .F.
       ENDIF
     
       RETURN CapicomClass():VerifySignature( cSignatureValue ) == cDigestValue
 
CREATE CLASS CapicomClass
     
       METHOD SelectCertificate()
       METHOD VerifySignature( cSignedData )
       METHOD HashData( cData, nAlgorithm )
       METHOD PublicKey( oCAPICOMCert )
       METHOD Sign( cDigestValue, oCAPICOMcert, nEncode, cPublicKey )
ENDCLASS
     
    METHOD SelectCertificate() CLASS CapicomClass
     
       LOCAL oCapicom, oCertificate
     
       oCapicom:= win_OleCreateObject( "CAPICOM.Store" )
       oCapicom:Open( CAPICOM_CURRENT_USER_STORE, "My", CAPICOM_STORE_OPEN_READ_ONLY )
       BEGIN SEQUENCE WITH { || __BreakBlock() }
          oCertificate := oCapicom:Certificates:Select( "Selecione um certificado digital", "Algoritmo de Assinatura SHA256RSA" )
       ENDSEQUENCE
     
       IF oCapicom:Certificates:Count() == 0
          RETURN NIL
       ENDIF
     
       RETURN oCertificate:Item( 1 )
     
    METHOD VerifySignature( cSignedData ) CLASS CapicomClass
     
       LOCAL oCapicom
     
       IF cSignedData == NIL
          RETURN NIL
       ENDIF
     
       oCapicom := win_OleCreateObject( "CAPICOM.SignedData.1" )
       oCapicom:Verify( cSignedData, .F., CAPICOM_VERIFY_SIGNATURE_ONLY )
       
       RETURN oCapicom:Content
     
    METHOD HashData( cData, nAlgorithm ) CLASS CapicomClass
     
       LOCAL oCapicom, oUtil
     
       IF cData = NIL
          cData := Dtos( Date() ) + Time()
       ENDIF
     
       IF nAlgorithm = NIL
          nAlgorithm := CAPICOM_HASH_ALGORITHM_SHA256
       ENDIF
     
       oUtil    := win_OleCreateObject( "CAPICOM.Utilities" )
       oCapicom := win_OleCreateObject( "CAPICOM.HashedData.1" )
       oCapicom:Algorithm := nAlgorithm
       oCapicom:Hash( cData )
     
       RETURN oUtil:Base64Encode( outil:HexToBinary( oCapicom:Value ) )
     
    METHOD PublicKey( oCapicomCert ) CLASS CapicomClass
     
       LOCAL cPublicKey
     
       cPublicKey := StrTran( /* oCapicom:Certificate:*/ oCapicomCert:Export( CAPICOM_ENCODE_BASE64 ), Chr(13) + Chr(10), "" )
     
       RETURN cPublicKey
     
    METHOD Sign( cDigestValue, oCAPICOMCert, nEncode, cPublicKey ) CLASS CapicomClass
     
       LOCAL oCAPICOMSignedData, oCAPICOMSigner, oCAPICOMTimeStamp, cSignature
     
       IF cDigestValue = NIL
          RETURN NIL
       ENDIF
     
       IF nEncode = NIL
          nEncode := CAPICOM_ENCODE_BASE64
       ENDIF
     
       oCAPICOMSigner := win_OleCreateObject( "CAPICOM.Signer.2" ) // versao 2
     
       IF oCAPICOMCert = NIL
          oCAPICOMCert := ::SelectCertificate()
          IF oCAPICOMCert = NIL
             RETURN NIL
          ENDIF
          oCAPICOMSigner:Certificate := oCAPICOMcert
       ELSE
          oCAPICOMSigner:Certificate := oCAPICOMcert:DefaultInterface
       ENDIF
     
       IF ! ( oCAPICOMSigner:Certificate:HasPrivateKey ;
             .AND. Dtos( oCAPICOMSigner:Certificate:ValidFromDate ) <= Dtos( Date() ) ;
             .AND. Dtos( oCAPICOMSigner:Certificate:ValidToDate ) >= Dtos( Date() ) )
          RETURN NIL
       ENDIF
     
       oCAPICOMSigner:Options := CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT
       cPublicKey             := StrTran( oCAPICOMSigner:Certificate:Export( CAPICOM_ENCODE_BASE64 ), Chr(13) + Chr(10), "" )
     
       oCAPICOMTimeStamp := win_OleCreateObject( "CAPICOM.Attribute" )
       oCAPICOMTimeStamp:Name  := CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME
       oCAPICOMTimeStamp:Value := hb_DateTime()
     
       oCAPICOMSigner:AuthenticatedAttributes:Add( oCAPICOMTimeStamp )
     
       oCAPICOMSignedData := win_OleCreateObject( "CAPICOM.SignedData.1" )
       oCAPICOMSignedData:Content := cDigestValue

       cSignature := oCAPICOMSignedData:Sign( oCAPICOMSigner, .F., nEncode )
RETURN cSignature
 
 

Compila perfecto,
Al ejecutar da éste error
Code: Select all  Expand view  RUN

Error description: Error BASE/1003  Variable does not exist: CAPICOM_HASH_ALGORITHM_SHA256

Stack Calls
===========
   Called from: D:\Sistemas\IRRIGACION\ALMACEN\FirmaXml\PRG\FirmaXml.prg => CAPICOMCLASS:HASHDATA( 0 )
   Called from: D:\Sistemas\IRRIGACION\ALMACEN\FirmaXml\PRG\FirmaXml.prg => MAIN( 0 )
 


Gracias por la ayuda
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1644
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Firmar con COPICOM RSA SHA256

Postby paquitohm » Sat Jun 10, 2023 11:59 am

Hola,

Me interesa mucho poder firmar con un firmador que sea rapido.
Utilizo otro para firmar pero es más lento que el caballo del malo.

El error se debe a que hace falta los defines de los valores que se encuentran en capicom.h

CAPICOM_HASH_ALGORITHM_SHA1 Secure Hash Algorithm (SHA) that generates a 160-bit message digest.
0
CAPICOM_HASH_ALGORITHM_MD2 MD2 hashing algorithm.
1
CAPICOM_HASH_ALGORITHM_MD4 MD4 hashing algorithm.
2
CAPICOM_HASH_ALGORITHM_MD5 MD5 hashing algorithm.
3
CAPICOM_HASH_ALGORITHM_SHA_256 SHA-256 hash algorithm.
CAPICOM 2.0.0.3 and earlier: This value is not supported.
4
CAPICOM_HASH_ALGORITHM_SHA_384 SHA-384 hash algorithm.
CAPICOM 2.0.0.3 and earlier: This value is not supported.
5
CAPICOM_HASH_ALGORITHM_SHA_512 SHA-512 hash algorithm.
CAPICOM 2.0.0.3 and earlier: This value is not supported.


salu2
paquitohm
 
Posts: 266
Joined: Fri Jan 14, 2022 8:37 am

Re: Firmar con COPICOM RSA SHA256

Postby acuellar » Sat Jun 10, 2023 12:45 pm

Estimado Paquito

Y cómo lo hace?
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1644
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Firmar con COPICOM RSA SHA256

Postby karinha » Sat Jun 10, 2023 2:09 pm

Buén dia estimado. Tú eres un Hombre de suerte:

http://www.pctoledo.com.br/forum/viewtopic.php?f=43&t=18509

jajajajajajajaja.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Firmar con COPICOM RSA SHA256

Postby karinha » Sat Jun 10, 2023 2:16 pm

Code: Select all  Expand view  RUN

[url]
http://www.pctoledo.com.br/forum/viewtopic.php?f=43&t=18509
[/url]

// xp, window vista, 2003 server ou posterior
// Capicom.dll - Capicom 2.0 - Capicom.h

#Include "FiveWin.ch"

#define CAPICOM_HASH_ALGORITHM_SHA1     0
#define CAPICOM_HASH_ALGORITHM_MD2      1
#define CAPICOM_HASH_ALGORITHM_MD4      2
#define CAPICOM_HASH_ALGORITHM_MD5      3
#define CAPICOM_HASH_ALGORITHM_SHA_256  4
#define CAPICOM_HASH_ALGORITHM_SHA_384  5
#define CAPICOM_HASH_ALGORITHM_SHA_512  6

FUNCTION HashCapicom( sTexto, AlgoritimoHash  )

   LOCAL objHash

   IF sTexto = NIL
      sTexto := DToS( Date() ) + Time()
   ENDIF

   IF AlgoritimoHash = NIL
      AlgoritimoHash := CAPICOM_HASH_ALGORITHM_SHA_512
   ENDIF

   objHash := CreateObject( "CAPICOM.HashedData.1" )
   objHash:Algorithm := AlgoritimoHash
   objHash:Hash( sTexto )

   // ? "Hash.......: ", objHash:Value
   // ? "Hash Tamanh: ", Len(objHash:Value)
   // ?

RETURN( objHash:Value )

FUNCTION CriptCapiCom( sTexto, strHash, AlgoritimoCript, TamanhoChave )

   LOCAL objEnc

   IF AlgoritimoCript = NIL
      AlgoritimoCript := CAPICOM_ENCRYPTION_ALGORITHM_AES
   ENDIF

   IF TamanhoChave = NIL
      TamanhoChave := CAPICOM_ENCRYPTION_KEY_LENGTH_MAXIMUM
   ENDIF

   objEnc  := CreateObject( "CAPICOM.EncryptedData.1" )

   objEnc:Algorithm := AlgoritimoCript
   objEnc:Algorithm:KeyLength := TamanhoChave
   objEnc:SetSecret( strHash )
   objEnc:Content := sTexto

   // ? "Encriptado.: ", objEnc:Encrypt
   // ? "Encrip Tam.: ", Len(objEnc:Encrypt)
   // ? "Algoritimo.: ", objEnc:Algorithm
   // ?

RETURN( objEnc:Encrypt )

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Firmar con COPICOM RSA SHA256

Postby paquitohm » Sat Jun 10, 2023 2:40 pm

acuellar wrote:Estimado Paquito

Y cómo lo hace?


Firmo con autofirmacommandline.exe pero es lento como él solo
paquitohm
 
Posts: 266
Joined: Fri Jan 14, 2022 8:37 am

Re: Firmar con COPICOM RSA SHA256

Postby acuellar » Sat Jun 10, 2023 6:47 pm

Muchas gracias estimados

Con éste código llego a obtener el Hash que indica éste punto
6. Tomar la sección de la firma y obtener un HASH del mismo aplicando el algoritmo SHA256.
Code: Select all  Expand view  RUN

#include "FiveWin.ch"
#define CAPICOM_HASH_ALGORITHM_SHA_256  4

Function Main()
 LOCAL cPrivateKey:= cSignXml:= "",cSignatureValue, cDigestValue

#pragma __cstream|cPrivateKey:=%s
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEArguSG5QZ8OeX3NynUh15jxT9SHf0F854Qml+GzzDkAWV3bu1
rzpU9HBG34RYiWVRaM7032WAzpXwpjLSWOvpCooSU7UKKaeXJ85ZSVtcbXLx1nRi
PvCdXwpZesCyu9fLTASECEpLUv2f14te5pV+4w7JUlfv7Cg8hr8R0kMCsGwir6TP
XOaXLFe7bGIz/wXGfw4Wh3MuD399JwkijPnZo3aLvnSBOrBYgdpYFQDAvpEKO0fk
DeWSoxg2kvt9H//04zTSTlD0frSnvhjy4KoCor7zAybjlr7mOis0SckAId3q8pF/
wxV0xHDEzes1MuHj+ANj2p5kRYh+TFQJYGQB7QIDAQABAoIBABd0ILbNsOc5Vkoh
g/y5Uxm4ct9SptaUcLlGXQOPnyzny8fLFVMtMaiU/r/9Ji8xs5RDm1UFaSOtqfXD
kHwCIm/Upl6YXWu6lVB8aqTLhnuLS1KicWDY7OQTUXaMxCkzDcbLLv2tAVSIMAOM
WPgKukQfyHprtj2lOG7SDbU/aXvbhbTGD5bKBrcau2e7pcXNrMwXuujxrs3e6Iyl
H/F8o7p4RHI7lPc/uv/65ehFeFZIBUZNbk+lMo+b7GLDbu56DcowKe54bkuH5tf4
SX8Ud4kUkyCbVLT+5Eub0JNlYqVnTkpypj3Il1WjVXvkuOGRlmKCgT2qe+z1VImo
13Obf5ECgYEA1wN2EERlJefpDwpZUJfabGr1/+HZS5zlkXSLk3rrT0XI5achHaHl
AlbPmWba6Hq4hq+nMBV54tBTwgEpvSTRcfM74NVY1Y1y7C4uvtJLxBHfcVTMkDeC
MWqeeeBI3k9f78TLHTt5qAL0tccgaVaQIMHaobdyFeUExRdl/2+NMZkCgYEAzzjg
5BZxt3/Xzzn8yTbr9/MBJSKp2WqnEZT2RfYyn41n4RDCY7txVrou97FtS4K5FxSk
37W029/4tG/3s/RBEeyJ7vnKxvtlhVwj2GNcCbxHM7q3kXevV48fYiAqBkpiZO5a
ULgUeEuLpnaap7v0xetGLExBfjyIuU76cS4Tb3UCgYEApSYRbxk5n83rYxQN2itp
J9FYNjyhDMTsR7b+5j6Jsw/k6RBgDUSmhA9t0WQBTIPGbB1LC1HTlvVxABiomJFJ
Fn8/RMhaPV0yIlquqP8aFvWrbH83yKX6KD6+jtpI3giVpbLAWCmwne33TBAwwvgs
KBz98yzWQh7wdPot6+8gwjECgYAt6gNiZlqx9uChaM7K4qFsIeq6CLErnEcCTUg3
/jH/SjyfELCRmoGlXsFzXlvCJGfQZmGVs9Qr97dKe5idxdv5FbkGO1CjwCYhY2YJ
1xIYkiAQpSlxUNyIAQ1KF6hYFnkwteNLCU53zP1XV+YyjiHRDK1SuV61ksIUlRxG
oZfq1QKBgQCMqD/JOmfE+Kb1o5HwsRpbjhboux0UltUqx3WU0iOb36sfEo+W3AsV
ZbMOu2HGJFqLe7edORx7a/ztmuhNkEUBJXh8wc2zUvhhw80eOv32tWIAwkQQ0+Rs
1f9JmziEDr+szcAWjPCb5SWpGG46XsE0z1IwGXrHUC68eAIb0wA/Qw==
-----END RSA PRIVATE KEY-----
#pragma __endtext
*
#pragma __cstream|cSignXml:=%s
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
            <CanonicalizationMethod
                    Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
            <SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"></SignatureMethod>
            <Reference URI="">
                <Transforms>
                    <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform>
                    <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"></Transform>
                </Transforms>
                <DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></DigestMethod>
                <DigestValue>V7cTT+m5Xdb5ViNzHVzEe4LtJFF1WO/tWrlzUZiyRlI=</DigestValue>
            </Reference>
        </SignedInfo>
        <SignatureValue>
        </SignatureValue>
        <KeyInfo>
            <X509Data>
                <X509Certificate>
                </X509Certificate>
            </X509Data>
        </KeyInfo>
    </Signature>
#pragma __endtext
 
 cNewXml:="D:\Sistemas\IRRIGACION\ALMACEN\NewFact.xml"
 
  cHash256:=HashCapicom( cSignXml, 4  )
 
   Hb_MemoWrit(cNewXml,cHash256)
Return Nil 
*
FUNCTION HashCapicom( cTexto, AlgoritimoHash  )

   LOCAL objHash
   objHash:= win_OleCreateObject( "CAPICOM.HashedData.1" )
   objHash:Algorithm := AlgoritimoHash
   objHash:Hash( cTexto )
   
RETURN objHash:Value
 

Devuelve éste Hash 5DB86A655ECB2C5CA587B3400630EAEEA97D51F23DADA29DF0114252FD685D62

Me falta realizar éstos punto
7. Encriptar el HASH obtenido utilizando el algoritmo RSA SHA256 con la llave privada.
8. Aplicar a la cadena resultante el algoritmo Base64 para obtener una cadena.
El resultado debe ser similar a éste
Code: Select all  Expand view  RUN

g0WhNQ1P8mieuK7IwRYzHQLwTRjo3UmUN9S1KuaJ00X867aomQg4pY3Q4trPTaIjqoKgVLKFBAxo
yBzsW8GzuKOBTPZh+pGD1JHnGcg15/UN8pR27275xXQzolYGF0V9FBj8URFfrIsgCaIG9sJO2nVq
8+Wiw+DFw34rkaW4/Bgk6UUSaciOCPW97pPZMQt8YEYtQAJ2TEy6+oOeQOjj89TEExWLe96UyRuR
WnAacPebG8ITUMgV3EV59lLbiHztVLk9bCb+uLyjDmeToKc79F0+ybkVTCRJxdmaqcY4X7ufI06S
PpjwB8La/o3d0aQKg+2LSZgwSHyvz7AyP7T88w==
 


y no se cómo obtenerlo :( Realmente que complicado. :(
En ésta página se puede obtener el resultado en linea para tener una idea
https://8gwifi.org/rsasignverifyfunctions.jsp
Con la opción SHA256withRSA

Realmente necesito ayuda
Saludos,

Adhemar C.
User avatar
acuellar
 
Posts: 1644
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Firmar con COPICOM RSA SHA256

Postby paquitohm » Sun Jun 11, 2023 2:22 pm

El amigo José Quintas usa Capicom
https://github.com/JoseQuintas/sefazclass


También el amigo Diego Fazio hizo algo

https://groups.google.com/g/harbour-use ... pFwjQQBgAJ
paquitohm
 
Posts: 266
Joined: Fri Jan 14, 2022 8:37 am

Re: Firmar con COPICOM RSA SHA256

Postby karinha » Sun Jun 11, 2023 4:17 pm

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7831
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests