Eric Winfly 1 Posted 10 hours ago This is what i try before but my content i need to sign text like this : 100000000120250815090926+000000000.25+000000000.50+000000005.75567891234RT00015678912340TQ0001FACOPE======================================================================================== And when i use your code you specify i obtain Base64Encoded String of length of 96 but her specification need a length of 88 (i use IcsBase64EncodeTB after SignDigest) ? Now i have try : TSslCertTools *Tool = new TSslCertTools(NULL); AnsiString DataEnc, Digest, Secret; TBytes SigTB, DataTB = IcsStringToTBytes(Data), SecretTB, DigestTB; //Tool->PrivateKeyLoadFromPemFile("Certificat.pem"); //DataEnc = IcsAsymSignDigest(Data, Tool->PrivateKey, Digest_sha256); //DataEnc = IcsBase64Encode(DataEnc); //DataEnc = IcsAsymSignDigest(Data, Tool->PrivateKey, Digest_sha256); //DataEnc = IcsBase64Encode(DataEnc); delete Tool; //return (DataEnc); //Configuration->FieldByName("CertificatKEY")->AsString; Secret = Configuration->FieldByName("CertificatKEY")->AsString; DataTB = IcsStringToTBytes(Data); SecretTB = IcsStringToTBytes(Secret); DigestTB = IcsHMACDigestTB(DataTB, SecretTB, Digest_sha512); DataEnc = IcsBase64EncodeTB(DigestTB); With this last call i obtain 88 of length but the server tell me this is not sign with the FingerPrint of the last cert ??? Note : i put Digest_sha512 because this give me 88 of length ! Share this post Link to post
Eric Winfly 1 Posted 8 hours ago Also im not sure if ICS Library digital signature with format p1363 or ASN, i also need to create a p1363 sign ? Share this post Link to post