Difference between revisions of "DES3 ENCRYPT()"

From Lianjapedia
Jump to: navigation, search
(Example)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Function to return the 3DES encrypted value for a character string
+
Function to return the 3DES encrypted character value for a character string
  
 
==Syntax==
 
==Syntax==
Line 6: Line 6:
  
 
==See Also==
 
==See Also==
[[CRC32()]], [[DES3_DECRYPT()]], [[MD5()]], [[MD5FILE()]], [[SHA1()]], [[SHA1FILE()]], [[SYS()]]
+
[[CRC32()]], [[DES3_DECRYPT()]], [[DECRYPT]], [[ENCRYPT]], [[MD5()]], [[MD5FILE()]], [[RTOS()]], [[SHA1()]], [[SHA1FILE()]], [[SET ENCRYPTION]], [[SYS()]]
  
 
==Description==
 
==Description==
The DES3_ENCRYPT() function is used to return the 3DES value for the character string, <cExp>, based on the specified key or keys <cKey1>, <cKey2>, <cKey3>.
+
The DES3_ENCRYPT() function is used to return the 3DES character value for the character string, <cExp>, based on the specified key or keys <cKey1>, <cKey2>, <cKey3>.
  
 
Used with the same key or keys, the DES3_DECRYPT() function will return the decrypted value.
 
Used with the same key or keys, the DES3_DECRYPT() function will return the decrypted value.
Line 30: Line 30:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
cEncrypted = des3_encrypt("LIANJA","abcdefgh","ijklmnop","qrstuvwx")
+
cEncrypted = des3_encrypt("LIANJA","abcdEFGH","ijklm123","45673$%^")
cDecrypted = des3_decrypt(cEncrypted,"abcdefgh","ijklmnop","qrstuvwx")
+
cDecrypted = des3_decrypt(cEncrypted,"abcdEFGH","ijklm123","45673$%^")
 
</code>
 
</code>
  
Line 38: Line 38:
 
[[Category:Lianja VFP Extensions]]
 
[[Category:Lianja VFP Extensions]]
 
[[Category:VFP Function Extensions]]
 
[[Category:VFP Function Extensions]]
 +
[[Category:Lianja v3.0]]
 +
[[Category:Encryption]]

Latest revision as of 06:46, 20 April 2022

Purpose

Function to return the 3DES encrypted character value for a character string

Syntax

DES3_ENCRYPT(<cExp>, <cKey1> [, <cKey2> [, <cKey3>]])

See Also

CRC32(), DES3_DECRYPT(), DECRYPT, ENCRYPT, MD5(), MD5FILE(), RTOS(), SHA1(), SHA1FILE(), SET ENCRYPTION, SYS()

Description

The DES3_ENCRYPT() function is used to return the 3DES character value for the character string, <cExp>, based on the specified key or keys <cKey1>, <cKey2>, <cKey3>.

Used with the same key or keys, the DES3_DECRYPT() function will return the decrypted value.

Keywords Description
cExp Character expression to be encrypted.
cKey1 Character expression to use as the first encryption key. Maximum 8 characters.
cKey2 Character expression to use as the second encryption key. Maximum 8 characters. Optional.
cKey3 Character expression to use as the third encryption key. Maximum 8 characters. Optional.

This function was added in Lianja 2.0.2.

Example

cEncrypted = des3_encrypt("LIANJA","abcdEFGH","ijklm123","45673$%^")
cDecrypted = des3_decrypt(cEncrypted,"abcdEFGH","ijklm123","45673$%^")