# VSSLKey

Esta clase representa a una clave de un certificado SSL.

Para usar esta clase requiere importarla previamente a su uso:&#x20;

`importClass ( "VSSLKey" );`

Las funciones de esta clase no está disponibles mi en macOS ni en iOS.

## Indice de funciones

### Generales

int [algorithm](#int-algorithm)()

void [clear](#void-clear)()

bool [isNull](#bool-isnull)()

int [length](#int-length)()

VByteArray [toDer](#vbytearray-toder)()

VByteArray [toPem](#vbytearray-topem)()

int [type](#int-type)()

## Enumeraciones

### Tipos de algoritmos de clave

Algoritmo RSA = 1

Algoritmo DSA = 2

Algoritmo de curva elíptica = 3

Algoritmo de Diffie-Hellman = 4

Clave que debe ser tratada como una "caja negra" = 0

### Tipos de clave

Privada = 0

Pública = 1

## Documentación de funciones

### Funciones generales

#### int algorithm()

Devuelve un valor que se corresponde con el algoritmo de la clave. Ver [enum de tipos de algoritmos de clave](#tipos-de-algoritmos-de-clave).

#### void clear()

Limpia la clave.

#### bool isNull()

Comprueba si es una clave válida o no.

#### int length()

Devuelve el tamaño de la clave.

#### VByteArray toDer()

Devuelve un  [VByteArray](https://doc.velneo.com/31/velneo-vdevelop/scripts/lenguajes/javascript/clases/vbytearray) con el contenido de la clave en formato DER.

#### VByteArray toPem()

Devuelve un bytearray con el contenido de la clave en formato PEM.

#### int type()

Retorna un [VByteArray](https://doc.velneo.com/31/velneo-vdevelop/scripts/lenguajes/javascript/clases/vbytearray) con el valor valor del tipo de clave. Ver [enum de tipos de clave](#tipos-de-clave).


---

# Agent Instructions: 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:

```
GET https://doc.velneo.com/31/velneo-vdevelop/scripts/lenguajes/javascript/clases/vsslkey.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
