DES算法实现 function EncryStr(Str, Key: String): String; var StrByte, OutByte, KeyByte: array[0..7] of Byte; StrResult: String; I, J: Integer; begin if (Length(Str) > 0) and (Ord(Str[Length(Str)]) = 0) then raise Exception.Create('Error: the last char is NULL char.'); if Length(Key) < 8 t