简体   繁体   中英

Argon2id Hex to Hash

I'm migrating users from one user store to another. The user password info is stored in Argon2 hash. I have figured out all the inputs, I have the encoded hash but I cannot figure the steps between Hex Form and Encoded Form

I have used this generator for a lot of my testing.

My current database stores the passwords in the "Hex" format

1908e66ff0fb22c7e52f8820f511c9edc486....

The solution I am migrating to requires them to be in Encoded format for import

$argon2id$v=19$m=65536,t=2,p=1$<my-salt-hash>$GQjmb/D7IsflL4gg9RHJ7cS....  // I need last value

How do I turn the "Hex" string into either the full "Encoded" string at least the encoded hash password value (The last bit)

Since no programming language is mentioned, I'm going to give a general answer:

The last "encoded" part is the Base64 representation of the password hash (your hex string). One has to convert the hex representation into bytes and encode those into Base64.

Maybe this Hex-To-Base64-Converter is helpful: https://cryptii.com/pipes/base64-to-hex

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM