Encrypts a string. Uses a symmetric key-based algorithm, in

which the same key is used to encrypt and decrypt a string.

The security of the encrypted string depends on maintaining

the secrecy of the key. Uses an XOR-based algorithm that uses

a pseudo-random 32-bit key, based on a seed passed by the user

as a function parameter.

## Function *ENCRYPT*

## Beispiel

encrypt(string string,string key,[string algorithm,[string encoding,[any IVorSalt,[number iterations]]]]):string

## Argumente

Die Argumente für diese Funktion sind fest vorgegeben. Ausser den nachfolgenden Argumenten dürfen keine weiteren verwendet werden.

Name | Typ | Required | Beschreibung |
---|---|---|---|

string | string | Yes | String to encrypt. |

key | string | Yes |
Key or seed used to encrypt the string. |

algorithm | string | No |
The algorithm to use to decrypt the string. Must be the same as the algorithm used to encrypt the string. You may also specify other algorithm names as well as the feedback mode and padding scheme where applicable (in the format algorithm/mode/padding) as documented in the Java Cryptography Architecture (JCA) Reference Guide. |

encoding | string | No |
The binary encoding used to represent the data as a string. Must be the same as the algorithm used to encrypt the string. |

IVorSalt | any | No | Initialization Vector for algorithms with Feedback Mode that is not ECB, or Salt for Password Based Encryption algorithms |

iterations | number | No | number of Iterations for Password Based Encryption algorithms (ignored for all other algorithms). NIST recommends a minimum value of 1000. |