1,458 questions
1
vote
0
answers
78
views
PHP signed video URL with HMAC works initially but fails with 500 error after multiple downloads
I have a video streaming site, and I want to add an expire time and HMAC hash to my download/stream URLs.
I’m using the following function to generate signed URLs:
function generate_signed_url($...
0
votes
0
answers
89
views
Generating HMAC-SHA256 Token in JavaScript to Match PHP Output
I am trying to call an API written in PHP that generates a token using the following method:
base64_encode(hash_hmac("sha256", "<api-key>", "<email>:<gmdate('y-...
0
votes
0
answers
100
views
HMAC SHA-256 giving different results
I'm trying to replicate the result of this site here with python hmac/hashlib.
I have a json object that I need to get the hash of:
{"event":"transaction:status_update","date&...
0
votes
1
answer
145
views
How to implement HKDF with CryptoJS?
I am trying to implement HKDF with CryptoJS. (It's not allowed to use native crypto in my case.) The output of my implementation is different from the output from CyberChef, so I think my ...
1
vote
1
answer
122
views
MS Teams outgoing webhook HMAC authentication
I'm trying to set a MS Teams outgoing webhook with golang & Google App Engine (deployed with gcloud app deploy):
package main
import (
"crypto/hmac"
"crypto/sha256"
...
2
votes
0
answers
68
views
OpenSSL HMAC token creation leading to unknown seg fault
Im attempting to add some custom user access tokens to my Mongoose WS and Im generating an HMAC using OpenSSL lib to verify with. I'm using to all-in-one HMAC function provided by OpenSSL. However, *...
0
votes
1
answer
265
views
verify authorization telegram not equal hash nodejs
I'm encountering an issue with verifying Telegram authorization. Specifically:
The auth_data payload I receive from window.getUser.
{
"query_id": "AAHOmFBD....",
"...
0
votes
2
answers
135
views
Generate SHA-256 HMAC in Base64 in Google AppScript
I would like to generate a base64 HMAC Authentication Code in Google Appscript.
This website - provides the exact solution:
https://www.devglan.com/online-tools/hmac-sha256-online
I just somehow cant ...
0
votes
1
answer
384
views
FastAPI - Shopify computed hmac not matching received one
I’m building a Shopify public app and I’m having trouble with the HMAC verification process. Despite using the Shopify Secret from the Dashboard of my app at partners.shopify.com, I can’t get the ...
1
vote
1
answer
625
views
How to get Azure Functions [Javascript] raw Body data for HMAC signature verification (Twitch EventSub validation)
I have a similar request from the user here where I'm trying to generate an HMAC that matches the signature of a validation request from Twitch EventSub.
I'm following the example from Twtich for ...
0
votes
1
answer
1k
views
How to validate HMAC digest in python
I need to validate the digest of data send with HMAC.
I have been stuck on this for a couple of days now, I cannot match the digest in python, here is my code:
import hmac
import hashlib
import json
#...
0
votes
1
answer
280
views
Create HMAC SHA-1 in JS with byte array
I've created the following utility function which should create an HMAC SHA-1 hash in TypeScript using crypto-js:
import hmacSha1 from 'crypto-js/hmac-sha1'
export function hotp(
hmac: Uint8Array,
...
0
votes
1
answer
188
views
Trouble with HMAC Signature Verification Between Go and PHP for Encrypted URL
I'm working on a project that involves generating a signed, encrypted URL in PHP, which is then verified and decrypted in Go. However, I'm running into an issue with the HMAC signature verification ...
0
votes
0
answers
196
views
Python HMAC Digest differs from OpenSSL command
I need to create a signature from a private key and a message in Python using HMAC SHA256.
The OpenSSL command, ran in the command window, is the following:
echo -n "recvWindow=0&symbol=BTC-...
0
votes
1
answer
287
views
Double Decodes for HMAC JWTs using kids?
We are trying to use ruby-jwt to encode/decode HS256 signed JWTs using kids to indicate the record in a keystore that represents the key to use, but it seems like we need to do 2 decodes for ...
1
vote
1
answer
2k
views
HMAC/sha256 Token In Postman Pre-Req - Convert From js Sample
I am trying to send a payload to an API which requires auth in the header where a HMAC needs to be generated and encoded in base64. I am using postman and I believe that I will need to use the pre-req ...
1
vote
1
answer
354
views
PHP Function Generating Invalid HMAC Signature
I'm working on integrating MoonPay with my website but there is something I can't figure out.
Their default PHP code posted here: https://dev.moonpay.com/docs/ramps-sdk-url-signing#how-to-generate-...
0
votes
1
answer
379
views
Why does my TOTP algorithm sometimes generate the wrong OTP and other times the correct one?
I created a TOTP algorithm and provided a key from a site. When I entered that key into various sites to check if they all produce the same OTP, I found that they do. However, my algorithm sometimes ...
0
votes
0
answers
109
views
What is the difference between my HMAC-512 and Python's official HMAC-512?
This is the python code I have been asked to do for my Cryptography assignment, that is to implement the official HMAC function from RFC2104
from hashlib import sha512
b = 512 #block size of SHA-512
...
0
votes
1
answer
4k
views
Read a secret key from azure key vault in apim
i need to validate a hmac in my apim policy. For which the hmac secret will be stored in azure key vault. Below are the steps that i will be following in my policy
Read the secret key from the key ...
0
votes
1
answer
456
views
HMAC authentication of secret and payload in Symfony 5.4
My JavaScript code is making the following POST API call to my endpoint:
const payload = {
course: args,
recipient: roomId
};
const signature = this.calculateSignature(JSON.stringify(payload), ...
0
votes
0
answers
217
views
TypeError: 'hmac_hash_module' is an invalid keyword argument for pbkdf2_hmac()
I am trying to compute a master key with the pbkdf2_hmac. Please help me with the latest arguments that we need to pass in the pbkdf2_hmac for computing the key.
from hashlib import pbkdf2_hmac, ...
0
votes
0
answers
99
views
How can you determine the default length of an HMAC openssl digest?
I need to find the number of bits (and/or hex digits) generated by an openssl HMAC digest.
I generated the following function which can be included with source command, but I could not tease out
a ...
1
vote
1
answer
173
views
Trying to complete POST with Striga API, HMACs did not match
I'm developing a bank app with Striga API Rest but I can't validate this POST for create a user. Any can help for make this? Thanks!
Output error (On browser):
Array (
[authorization] => HMAC ...
-1
votes
1
answer
136
views
How to translate Java HMAC to Node/JavaScript?
I am trying to implement an HMAC signature in node from the vendor's provided Java example (their documentation was quite lacking, not detailing encodings, or requirements).
The vendor's provided Java ...