Solved Mysql password hashing vs2022


sdowney717

Well-known member
Member
VIP
Local time
3:40 PM
Posts
1,335
OS
windows 11

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
Continued here after 10 fails to post

I figure this is just a db command, not a column name
mysql> SET block_encryption_mode = 'aes-256-cbc';
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
And these are column names being assigned values
Code:
mysql> SET @key_str = SHA2('My secret passphrase',512);
mysql> SET @init_vector = RANDOM_BYTES(16);
mysql> SET @crypt_str = AES_ENCRYPT('text',@key_str,@init_vector);
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
It wont let me post the code in a select statement
Well the thread wont make any sense as I can not post example text for select statement, it is blocked by the site

Then this must be the data retrieval statement here to compare to a user password?
mysql> no one gets to see the code
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb

My Computers My Computers

  • At a glance

    Win 11 Pro 25H2Intel i7 13700KF32 GB Team Group DDR5 - 6000 CL 30ASUS TUF GAMING RTX 3070 Ti
    OS
    Win 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Intel i7 13700KF
    Motherboard
    Gigabyte Z790 UD AC
    Memory
    32 GB Team Group DDR5 - 6000 CL 30
    Graphics Card(s)
    ASUS TUF GAMING RTX 3070 Ti
    Sound Card
    On board Realtek
    Monitor(s) Displays
    ACER 34 inch
    Screen Resolution
    Not 4K like I thought. 35" wide though.
    Hard Drives
    1 TB Samsung 980 Pro Nvme, 1 TB Samsung 970 EVO Nvme, 2 x Samsung 970 2TB SSD SATA
    PSU
    EVGA 1000Q
    Case
    Rosewill something or other
    Cooling
    Noctua NH-D15. A whole schwak of Noctua case fans. $$$
    Keyboard
    Logitech G815
    Mouse
    Logitech G502 Hero
    Internet Speed
    700 up, 600 down
    Browser
    Firefox
    Antivirus
    MalwareBytes
  • At a glance

    Widows 11 ProRyzen 2700X32 GB DDR4XFX Radeon R9 280
    Operating System
    Widows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Self build
    CPU
    Ryzen 2700X
    Motherboard
    MSI X470 Gaming Plus Max
    Memory
    32 GB DDR4
    Graphics card(s)
    XFX Radeon R9 280
    Sound Card
    Onboard
    Monitor(s) Displays
    Two 27 inch Acer monitors
    Screen Resolution
    1920 x 1080
    Hard Drives
    One 1 TB NVME (Samsung)
    PSU
    Corsair 750 Watt
    Case
    HAF 912
    Cooling
    Wraith cooler and case fans
    Keyboard
    Logitech G710+
    Mouse
    Generic
    Internet Speed
    700 down, 650 up
    Browser
    Firefox, Chrome
    Antivirus
    Malware bytes
You might want to ask these questions at a place like Stack Overflow (Stack Overflow - Where Developers Learn, Share, & Build Careers)

You'll probably get more useful answers there.
yes can do that thanks.

Conceptually what does 'My secret pass phrase' represent.
What does 'text' represent?

Which one is the 'key'?

If someone can explain the truth of those, that will help give a clue as to what is what here.

I also found you can select the @vars and get results and I they are not column names, just values.

a picture of the code

1718009643580.png
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
Those 5 code lines run fine in command window for MariaDB and show the same results.
 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
Resolved with some help over here.

I can now understand what that was and also enough to implement salted hashes into my program.
It may actually be a little easier than I thought being it's all a functional part of the DB server.

 

My Computer My Computer

At a glance

windows 11old AMD B958gb
OS
windows 11
Computer type
PC/Desktop
Manufacturer/Model
some kind of old ASUS MB
CPU
old AMD B95
Motherboard
ASUS
Memory
8gb
Hard Drives
ssd WD 500 gb
Back
Top Bottom