Ver Mensaje Individual
  #502  
Antiguo 02-08-2022
nuevo1234 nuevo1234 is offline
Miembro
 
Registrado: abr 2017
Posts: 102
Reputación: 8
nuevo1234 Va por buen camino
Cita:
Empezado por ermendalenda Ver Mensaje
Código:
<?xml version="1.0" encoding="UTF-8"?>
<SistemaFacturacionAltaFact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd">


    <Cabecera>
        <IDVersion>0.1</IDVersion>
        <ObligadoEmision>        
            <NombreRazon>EMPRESA DE PRUEBA, S.A.</NombreRazon>
            <NIF>00000006Y</NIF>
        </ObligadoEmision>
    </Cabecera>    
    <RegistroAltaFacturas>
        <RegistroFacturacion>
            <PeriodoLiquidacion>
                <Ejercicio>2022</Ejercicio>
                <Periodo>3T</Periodo>
            </PeriodoLiquidacion>
            <IdFactura>
                <IdEmisorFactura>
                    <NIF>00000006Y</NIF>
                </IdEmisorFactura>
                <NumSerieFacturaEmisor>84.2.1.2566</NumSerieFacturaEmisor>
                <FechaExpedicionFacturaEmisor>31/07/2022</FechaExpedicionFacturaEmisor>
            </IdFactura>
            <TipoFactura>F2</TipoFactura>
            <FechaOperacion>31/07/2022</FechaOperacion>
            <DescripcionOperacion>VENTA MINORISTA</DescripcionOperacion>
            <Desglose>
                <DetalleDesglose>
                    <ClaveRegimen>01</ClaveRegimen>
                    <CalificacionOperacion>S1</CalificacionOperacion>
                    <TipoImpositivo>4.00</TipoImpositivo>
                    <BaseImponibleOimporteNoSujeto>1.00</BaseImponibleOimporteNoSujeto>
                    <CuotaRepercutida>0.04</CuotaRepercutida>
                </DetalleDesglose>
            </Desglose>
            <ImporteTotal>1.04</ImporteTotal>
            <EncadenamientoFacturaAnterior>
                <IDEmisorFacturaAnterior>00000006Y</IDEmisorFacturaAnterior>
                <NumSerieFacturaAnterior>84.2.1.2565</NumSerieFacturaAnterior>
                <FechaExpedicionFacturaAnterior>31/07/2022</FechaExpedicionFacturaAnterior>
                <HuellaFacturaAnterior>9yYI6U89U3IUIQE345EUGWEBsd7EKFCBP9trtYUJSD0JFFKJKrtthAuysfadfWPE</HuellaFacturaAnterior>
        
            </EncadenamientoFacturaAnterior>
            
            <SistemaInformatico>
                <NombreRazon>SISTEMAS INFORMATICOS TPV</NombreRazon>
                <NIF>00000006Y</NIF>
                <IdSistemaInformatico>IDENTIFICADOR AEAT XXXX</IdSistemaInformatico>
                <Version>46.243.1</Version>
                <NumeroInstalacion>45</NumeroInstalacion>
                <TipoUsoSistema>01</TipoUsoSistema>
            </SistemaInformatico>
        </RegistroFacturacion>
        
        <DatosControl>
            <Huella>005948F5A441A56ABF584804036409719AB89892608FD708BAB8AE5088C896AD</Huella>
            <TipoHash>01</TipoHash>
            <FechaGenRegistro>31/07/2022</FechaGenRegistro>
            <HoraGenRegistro>09:00:07</HoraGenRegistro>
            <HusoHorarioGenRegistro>02</HusoHorarioGenRegistro>
        </DatosControl>
    </RegistroAltaFacturas>
</SistemaFacturacionAltaFact>
Sigo teniendo la duda de si la hiella va en base64 o en hexadeccimal, ya que elsha256 ocupa 44 caracteres y el hex64 y aunque hayan definido una longitud maxima de 64 en el futuo pueden decidirotro tipo de hash y lo mismo esta preparado para sha512... o lo que venga
Me faltaban un par de campos
Código:
<CalificacionOperacion>S1</CalificacionOperacion> <CuotaRepercutida>0.04</CuotaRepercutida>
SHA-256 es un hash de 64 dígitos hexadecimales (un resumen, por ejemplo bd4526534df7b33772c2f1ee26d97c39ff11379c8848e4e19d74ad849ef66423) casi único de un tamaño fijo de 256 bits (32 bytes). Un hash solo se calcula en una dirección y no se puede decodificar de vuelta.

Por tanto la definición del SHA-256 ya indican que son 64 digitos en hexadecimal. Entiendo que no hay duda
Responder Con Cita