Score:0

Compare 2 strings encrypted by openssl bash command and php language?

si flag

a client need send somethings to PHP web server, I encrypted data on client by command:

echo -n "userId=4&rigId=1&vgaId=1&cc=150" | openssl dgst -sha256 -hmac "0123456789"

result:

(stdin)= 4012899484fcff6f7f3755e56eece253c53e33d6827ee3dfb310f65d9bda2f15

On PHP web server, how to use PHP language to encrypt "userId=4&rigId=1&vgaId=1&cc=150" to compare 2 strings is equal or not?

David avatar
cn flag
I am not seeing anything to do with the Ubuntu OS with this purely programming question in PHP.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.