> 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-sdk-android/es/security-and-privacy/nfc-wallet-sdk-obfuscation.md).

# Ofuscación del SDK NFC Wallet

## Resumen

NFC Wallet SDK está ofuscado con DexGuard.

En esta sección presentamos las reglas mínimas recomendadas de R8/ProGuard para ofuscar correctamente los paquetes y clases del SDK TSH. Estas reglas no afectan a los paquetes de la aplicación.

Consulte [Habilitar el optimizador de aplicaciones R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization).

## Reglas de R8/ProGuard

{% hint style="info" %}
Las siguientes reglas de consumo se incluyen en las bibliotecas .aar distribuidas y se aplican automáticamente cuando la ofuscación de código está habilitada en su aplicación.
{% endhint %}

```bash
#SDK de NFC Wallet
-dontwarn util.**
-dontwarn com.gemalto.mfs.mwsdk.**
-dontnote com.gemalto.mfs.mwsdk.utils.async.AbstractAsyncHandler
-keep class util.h.xz.** { *; }
-keepclasseswithmembernames class * {
native <methods>;
}
# Reglas globales de JNA
-keep,allowobfuscation interface com.sun.jna.Library
-keep,allowobfuscation interface com.sun.jna.Callback
-keep,allowobfuscation interface com.sun.jna.Function
-keep,allowobfuscation interface * implements com.sun.jna.Library
-keep,allowobfuscation interface * implements com.sun.jna.Callback
-keepclassmembers interface * implements com.sun.jna.Library {
<methods>;
}
-keepclassmembers interface * implements com.sun.jna.Callback {
<methods>;
}
-keep class com.sun.jna.CallbackReference {
void dispose();
com.sun.jna.Callback getCallback(java.lang.Class,com.sun.jna.Pointer,boolean);
com.sun.jna.Pointer getFunctionPointer(com.sun.jna.Callback,boolean);
com.sun.jna.Pointer getNativeString(java.lang.Object,boolean);
java.lang.ThreadGroup initializeThread(com.sun.jna.Callback,com.sun.jna.CallbackReference$AttachOptions);
}
-keep,includedescriptorclasses class com.sun.jna.Native {
com.sun.jna.Callback$UncaughtExceptionHandler callbackExceptionHandler;
void dispose();
java.lang.Object fromNative(com.sun.jna.FromNativeConverter,java.lang.Object,java.lang.reflect.Method);
com.sun.jna.NativeMapped fromNative(java.lang.Class,java.lang.Object);
com.sun.jna.NativeMapped fromNative(java.lang.reflect.Method,java.lang.Object);
java.lang.Class nativeType(java.lang.Class);
java.lang.Object toNative(com.sun.jna.ToNativeConverter,java.lang.Object);
int getNativeSize(java.lang.Class);
}
-keep class com.sun.jna.FromNativeConverter {
public java.lang.Class nativeType();
public java.lang.Object fromNative(java.lang.Object, com.sun.jna.FromNativeContext);
}
-keep class com.sun.jna.Native$ffi_callback {
void invoke(long,long,long);
}
-keep class com.sun.jna.Structure {
long typeInfo;
com.sun.jna.Pointer memory;
<init>(int);
void autoRead();
void autoWrite();
com.sun.jna.Pointer getTypeInfo();
com.sun.jna.Structure newInstance(java.lang.Class,long);
}
-keep class com.sun.jna.Structure$FFIType$FFITypes {
<fields>;
}
-keep class com.sun.jna.Structure$ByValue {
}
-keep class com.sun.jna.CallbackReference$AttachOptions {
<fields>;
}
-keep class com.sun.jna.Callback$UncaughtExceptionHandler {
void uncaughtException(com.sun.jna.Callback,java.lang.Throwable);
}
-keep class com.sun.jna.ToNativeConverter {
java.lang.Class nativeType();
}
-keep class com.sun.jna.NativeMapped {
java.lang.Object toNative();
}
-keep class com.sun.jna.IntegerType {
long value;
}
-keep class com.sun.jna.PointerType {
com.sun.jna.Pointer pointer;
}
-keep class com.sun.jna.LastErrorException {
<init>(int);
<init>(java.lang.String);
}
-keep class com.sun.jna.Pointer {
long peer;
<init>(long);
}
-keep class com.sun.jna.WString {
<init>(java.lang.String);
}
-keep class com.sun.jna.JNIEnv { *; }
Nota

```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.payments.thalescloud.io/nfc-wallet-sdk-android/es/security-and-privacy/nfc-wallet-sdk-obfuscation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
