Give us feedback
hashgeneratorv1-xif
Service icon

Hash Generator

Stable version 1.0.0 (Compatible with OutSystems 11)
Also available for 10
Uploaded on 26 September 2020 by 
5.0
 (1 rating)
hashgeneratorv1-xif

Hash Generator

Documentation
1.0.0

Extension parameters:


INPUT PARAMETERS:

1) Date: The Invoice Date;

2) Invoice: Invoice Number;

3) Total: The Invoice total amount;

4) LastHash: Last Hash of the same series invoice.

5) Private key in XML format:

Example:

<RSAKeyValue><Modulus>21wEnTU+mcD2w0Lfo1Gv4rtcSWsQJQTmkjuio05AOkV/Er9w3Y13Ddo5wGtjJ19402S71HUeN0vbKILLJdRS

ES5MHSdJPSVrOqdrll/vLXxDxWs/U0UT1c8u6k/Ogx9hTtZxYwoeYqdhDblof3E75d9n2F0Zvf6iTb4cI7j6fMs=</Modulus><Exponent>AQAB</Exponent><P>/aULPE6jd5IkwtWXmReyMUhmI/nfwfkQSinfes2PKdpcxk4mpPZUdEQhHQLvE84w2DhTyYkPHCtq/mMKE3MHw==</P><Q>3WV46X9Arg2l9cxb67KVlNVXyCqc/w+LWt/tbhLJvV2xCF/0rWKPsBJ9MC6cquaqNPxWWEav8RAVbmmGrJt51Q==</Q><DP>8TuZFgBMpBoQcGUoS2goB4st6aVq1FcG0hVgHhUI0GMAfYFNojuyV3cY2IBt8Oj/uYJYhyhlaj5YTqmGTYbATQ==</DP><DQ>FIoVbZQgrAUYIHWVEYi/187zFd7eMct/Yi7kGBImJStMATrluDAspGkStCWe4zwDDmdam1XzfKnBUzz3AYxrAQ==</DQ><InverseQ>QPU3Tmt8nznSgYZ+5jUo9E0SfjiTu435ihANiHqqjasaUNvOHKumqzuBZ8NRtkUhS6dsOEb8A2ODvy7KswUxyA==

</InverseQ><D>cgoRoAUpSVfHMdYXW9nA3dfX75dIamZnwPtFHq80ttagbIe4ToYYCcyUz5NElhiNQSESgS5uCgNWqWXt5PnPu4XmCXx6utco1UVH8HGLahzbAnSy

6Cj3iUIQ7Gj+9gQ7PkC434HTtHazmxVgIR5l56ZjoQ8yGNCPZnsdYEmhJWk=</D></RSAKeyValue> 


OUTPUT PARAMETERS:

1) Generated Hash: The resulting hash number based on the input parameters.

Example:

J01e286ac7jaLyM73Zu4DcTrHUlY69SbXQMldyxXZc8S/cfeI8NQnpmBbBHjTbU75vmTL+2YJdE4GueXpYpaHr4aPJ0htan37K0yvNxga

jGyCBuShWkNLtSlVd8UKyG2tdFKN/30dcym7Y+ukeay2gDexEdvpBBa6tD+/a7hGAc


Note: In the client invoice it'll be only necessary some char positions of this resulting hash.

Guide line in Portuguese, for the authorities in Portugal:

"O documento impresso entregue ao cliente ou o documento eletrónico enviado deve conter impressos obrigatoriamente quatro carateres da assinatura [campos Chave do documento (Hash) das tabelas subordinadas da tabela 4 – Documentos comerciais (SourceDocuments) do SAF-T(PT)] correspondentes às posições 1ª, 11ª, 21ª, e 31ª e separado por um “-“ (hífen) a expressão “Processado por programa certificado n.º <Número do certificado atribuído pela AT>/AT. Exemplo: “AxAx-Processado por programa certificado n.º0000/AT” (sem aspas)."