---
title: "Algorithm"
url: "https://reference.aspose.com/pdf/java/com.aspose.pdf.facades/algorithm/"
product: "Aspose.PDF for Java API Reference"
description: "Represents algorithms which can be used to encrypt pdf document."
---

**Inheritance:**
java.lang.Object, java.lang.Enum < Algorithm > com.aspose.pdf.facades.Algorithm, java.lang.Enum < Algorithm >, com.aspose.pdf.facades.Algorithm

**All Implemented Interfaces:**
Serializable, Comparable < Algorithm >

```
public enum Algorithm extends Enum < Algorithm >
```

Represents algorithms which can be used to encrypt pdf document.

## Fields

| Field | Description |
| --- | --- |
| [AES](#AES) | AES algorithm. |
| [RC4](#RC4) | RC4 algorithm. |

## Methods

| Method | Description |
| --- | --- |
| [getValue](#getValue--) |  |
| [valueOf](#valueOf-java.lang.String-) | Returns the enum constant of this type with the specified name. |
| [values](#values--) | Returns an array containing the constants of this enum type, in the order they are declared. |

### AES {#AES}
```
public static final Algorithm AES
```

AES algorithm.

### RC4 {#RC4}
```
public static final Algorithm RC4
```

RC4 algorithm.

### getValue {#getValue--}
```
public int getValue()
```



### valueOf {#valueOf-java.lang.String-}
Returns the enum constant of this type with the specified name.

### values {#values--}
```
public static Algorithm [] values()
```

Returns an array containing the constants of this enum type, in the order they are declared.

**Returns:**
an array containing the constants of this enum type, in the order they are declared
