> For the complete documentation index, see [llms.txt](https://docs.payments.thalescloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payments.thalescloud.io/nfc-wallet/es/backend-de-nfc-wallet/registro-de-tarjeta/cifrar-la-informacion-de-la-tarjeta.md).

# Cifrar la información de la tarjeta

## Descripción general

Las credenciales de la tarjeta son información sensible. Encríptelas antes de comenzar la inscripción de la tarjeta con el NFC Wallet SDK.

## Requisitos de cifrado de la tarjeta

La información de la tarjeta usa el formato de cifrado PKCS#7 definido en RFC 2315 y RFC 5652 con los siguientes criterios de cifrado:

* Algoritmo de cifrado de contenido: AES256/CBC/PKCS7Padding
* Algoritmo de cifrado de clave: RSA con longitud de la clave pública del emisor de 2048 bytes.

La carga útil de la tarjeta que se va a cifrar debe contener los siguientes campos JSON:

<table><thead><tr><th width="123.88885498046875">Campo JSON</th><th width="402.66668701171875">Descripción</th><th width="89.7777099609375">MOC</th><th>Longitud</th></tr></thead><tbody><tr><td><code>fpan</code></td><td>El PAN de financiación que se va a digitalizar.</td><td>M</td><td>16-20</td></tr><tr><td><code>exp</code></td><td>La fecha de caducidad de la tarjeta en el formato MMYY.</td><td>M</td><td>4</td></tr><tr><td><code>cvv</code></td><td>El código de seguridad es opcional. Su presencia depende del emisor de la tarjeta.</td><td>C</td><td>3-4</td></tr><tr><td><code>nonce</code></td><td>Este valor efímero se usa solo para el flujo de inscripción verde. Si se proporciona, también debe proporcionarse en el token de autenticación el hash SHA256 del nonce.</td><td>O</td><td>1-50</td></tr></tbody></table>

El resultado del cifrado debe codificarse luego en base64.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.payments.thalescloud.io/nfc-wallet/es/backend-de-nfc-wallet/registro-de-tarjeta/cifrar-la-informacion-de-la-tarjeta.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
