I'm using TurboPower LockBox for the first time, and using the TwoFish algorithm to first encrypt a password, and later retrieve the password by decrypting the generated hash. I would like to know if the approach that I'm using is good, and if there are any pitfalls to avoid. Its a simple use case for my application to store and later retrieve a mail server password.This is the code I'm using:// Steve Faleiro 2016-03-06uses uTPLb_CryptographicLibrary, uTPLb_Codec;function TwoFish_ENC(const AString: String): String;var  CryptoLib: TCryptographicLibrary;  Codec: TCodec;  encryptedStr: String;begin  CryptoLib := TCryptographicLibrary.Create(nil);  Codec := TCodec.Create(nil);  try    Codec.CryptoLibrary := CryptoLib;    Codec.StreamCipherId := 'native.StreamToBlock';    Codec.BlockCipherId := 'native.Twofish';    Codec.ChainModeId := 'native.CBC';    Codec.Reset;    Codec.Password := '56410AD2-9DD6-4B8C-9D2F-5DE7A7F7085E';    Codec.EncryptString(AString, encryptedStr, TEncoding.UTF8);  finally    CryptoLib.Free;    Codec.Free;  end;  Result := encryptedStr;end;function TwoFish_DEC(const AString: String): String;var  CryptoLib: TCryptographicLibrary;  Codec: TCodec;  decryptedStr: String;begin  CryptoLib := TCryptographicLibrary.Create(nil);  Codec := TCodec.Create(nil);  try    Codec.CryptoLibrary := CryptoLib;    Codec.StreamCipherId := 'native.StreamToBlock';    Codec.BlockCipherId := 'native.Twofish';    Codec.ChainModeId := 'native.CBC';    Codec.Reset;    Codec.Password := '56410AD2-9DD6-4B8C-9D2F-5DE7A7F7085E';    Codec.DecryptString(decryptedStr, AString, TEncoding.UTF8);  finally    CryptoLib.Free;    Codec.Free;  end;  Result := decryptedStr;end;Is it good enough? If not, is there any way to improve it?
LockBox TwoFish string encryption and decryption
cryptography;delphi