KCML_DES_Encrypt

Purpose

DES encrypts plaintext into cyphertext$ using a 56 bit key.

Definition

DEFSUB 'KCML_DES_Encrypt(Key$, plaintext$, BYREF cyphertext$) AS Void

Parameters

KeyString containing the key.
plaintextString to encrypt.
cyphertextEncrypted result. This will be REDIMed to size of plaintext$ rounded up to a multiple of 8 bytes.

Description

DES encryption is no longer regarded as completely secure against determined attack but it is very commonly used and not too expensive to compute. Trailing spaces are clipped from the plain text string unless surrounded by STR() or FLD(). The encryption is performed 8 bytes at a time so the encrypted string will be REDIMed to the next multiple of 8 above the effective length of the plain text string. DES is a symmetric cypher; see the complementary function 'KCML_DES_Decrypt(). For more information about DES see http://en.wikipedia.org/wiki/DES.

See also

Internal KCML Functions, Internally defined structures and Internally defined enumerations and constants.