i have record in mysql database i want to get the database record and encrypt its visibility to a viewer for example
i have record like this
Id : A45KL82 i want to encrypt it for exampl like this
{A450121E-KL02-8384-E853-256E62297091}
Encryption and decryption
Forum kuralları
Forum kurallarını okuyup, uyunuz!
Forum kurallarını okuyup, uyunuz!
Encryption and decryption
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: Encryption and decryption
i want to encode that record exactly same as GUID
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: Encryption and decryption
Hi ,
If you want to make "non-reversible" encryption you can use MD5() , Password() or sha() MySQL Functions , for example ;
if not ,
you can use DECODE() and ENCODE() MySQL Functions for "reversible" encryption. https://dev.mysql.com/doc/refman/5.5/en ... ion_encode
If you want to make "non-reversible" encryption you can use MD5() , Password() or sha() MySQL Functions , for example ;
Kod: Tümünü seç
SELECT MD5(my_secretdata_field) FROM mytable
you can use DECODE() and ENCODE() MySQL Functions for "reversible" encryption. https://dev.mysql.com/doc/refman/5.5/en ... ion_encode
Volkan KAMADAN
www.polisoft.com.tr
www.polisoft.com.tr
Re: Encryption and decryption
There are two major thing in your quest.
(1) Encrypt / Decrypt operation
(2) The encrypted text format must be look like a GUID type
- In my opinion, you need to take all of them to the Delphi side...
- (1) There are 32 characters exists in GUID type.
- (2) All characters must be between 0..9 and A..F (Hex charset dynamic)
- (3) Your encrypted (after encrypt process) text must be under or equal to 32 characters long.
- So the most important thing:
(a) How long is your source text will be encrypted.
(b) The character set of source. ( you can use longer if exists only numbers. If also characters exists in source text then it must shorter length )
GUID character limit is the only limiting factor in your quest.
If you only place the text into GUID separeted location, then user can find the solution easily. Two or more records repetation will be reveal your separation technic.
(1) Encrypt / Decrypt operation
(2) The encrypted text format must be look like a GUID type
- In my opinion, you need to take all of them to the Delphi side...
- (1) There are 32 characters exists in GUID type.
- (2) All characters must be between 0..9 and A..F (Hex charset dynamic)
- (3) Your encrypted (after encrypt process) text must be under or equal to 32 characters long.
- So the most important thing:
(a) How long is your source text will be encrypted.
(b) The character set of source. ( you can use longer if exists only numbers. If also characters exists in source text then it must shorter length )
GUID character limit is the only limiting factor in your quest.
If you only place the text into GUID separeted location, then user can find the solution easily. Two or more records repetation will be reveal your separation technic.
Re: Encryption and decryption
can i better insert to database unique unreapeated GUIDs ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
Re: Encryption and decryption
i tried something like that to generate unrepeated guids do i have a risk of dublicated record ? here is the code
Kod: Tümünü seç
MyGUID: TGUID;
MyWideChar: array[0..100] of WideChar;
begin
CoCreateGUID(MyGUID);
StringFromGUID2(MyGUID, MyWideChar, 39);
showmessage(WideCharToString(MyWideChar));
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
in god i trust with every movement i do
graduated student and looking for knowledge
- muratcelik64
- Üye
- Mesajlar: 17
- Kayıt: 16 Tem 2014 05:07
Re: Encryption and decryption
Example programs
https://yadi.sk/d/Yxg_uK3mic9Du
https://yadi.sk/d/Yxg_uK3mic9Du