Questions tagged [hmacsha256]
42 questions
1
vote
1 answer
HMAC produces different strings in Python3 vs Golang
I have a Golang function that calculates hmac for a given key and challenge. The go code is
func get_hmac64(psk string, challenge string) string {
mac := hmac.New(sha3.New256, []byte(psk))
mac.Write([]byte(challenge))
macSum :=…

amrx
- 673
- 1
- 9
- 23
1
vote
0 answers
JazzCash payment integration with API REACT NATIVE
I have been trying to integrate JazzCash payment with JazzCash Sandbox, but I am getting the same error in response from the server
Please provide valid value for pp_SecureHash.
I have tried various methods to create HMAC-SHA256
Documentation Link…

Hamza Zafar
- 11
- 2
0
votes
0 answers
Is it possible to verify AWS4-HMAC-SHA256 signature?
I have a unique case. I am building a proxy and would like to verify AWS4 signature.
for example:
ServiceA is assigned with RoleA and is making request to ProxyService.
I would like to verify using the amazon HTTP headers that the request actually…

Shelef
- 598
- 2
- 8
- 16
0
votes
1 answer
How to sign a request with AWS4-HMAC-SHA256?
I want to get the temporary credentials from the AWS STS service but no matter what I try I keep getting this error
Sender
…

Horuge
- 1
- 1
0
votes
0 answers
PHP Oauth 1.0 - Signature is invalid while accessing Rest API with GET Request & URL parameters
I am trying to get result from Rest API and URL with parameters. But I am getting error as - string(61) "{"message":"The signature is invalid. Verify and try again."}"
I have tried below code for it. It works perfect without URL parameters.
Can…

Nitz
- 145
- 1
- 6
0
votes
0 answers
How to encode a XML file with HMAC-SHA-256 (using shared key), convert it into base64 string and url encode it in Node JS
I am trying to generate a signature value which involved encoding a XML file, convert it into base64 string and url encode it using Node JS.
The XML file will be present in the code repository and will be same for all cases.
So far, I have tried…

Ansh
- 23
- 3
0
votes
0 answers
Keycloak JWT doesn't support HS256: Only works with RS* ES* etc
I'm having trouble using JWT as a bearer token (issued by Keycloak) when switching to HS256 signing algorithm in the KC UI.
If I configure JWT client to use Client Id and Secret and RS256, or ES256 and others I can successfully request a JWT token…

Traiano Welcome
- 783
- 2
- 12
- 24
0
votes
0 answers
Signing text with HMACSH256 in T-SQL to generate blob container authentication header
I need to generate the authentication header as stipulated here https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key#blob-queue-and-file-services-shared-key-authorization
SQL Server doesn't have built in algorithms…

Evan Barke
- 99
- 1
- 13
0
votes
1 answer
Convert Openssl HMAC SHA256 32-byte output to 64-byte string
I am using OpenSSL's HMAC SHA256 interface to hash a string:
unsigned char* res = HMAC(EVP_sha256(), key, key_len, data, data_len, result, result_len);
The size of the resulting hash `result_len` is 32 bytes. However, the interface I am programming…

bicoi77
- 5
- 4
0
votes
0 answers
Seeking API advice - GET using PowerShell / authentication
First time trying to deal with APIs, not usually a programmer of any sort.
API Docs: https://www.pt-lifespan.com/api/uat/housing/v1.1/lh/docs/index.html
I was looking to leverage PowerShell to obtain API data and export it into a .csv file. I've…

user2261755
- 159
- 1
- 3
- 17
0
votes
1 answer
Swift Key derivation. Public key decoding
I need a help with creating P256.Signing.PublicKey from child key that were got with using HMAC-Sha256 hashing (we implemented key derivation). And after that get a SecKey to create signature for messages
I can't understand how to decode it. Child…

Alina
- 37
- 7
0
votes
0 answers
Input length must be multiple of 16 when decrypting with padded cipher (PBEWITHHMACSHA512ANDAES_256)
I am trying to write and encrypt/decrypt program that. I am able to encrypt the String just fine, but while decrypting, I am getting the above error.
My code currently looks like this:
import java.nio.charset.StandardCharsets;
import…

hell_storm2004
- 1,401
- 2
- 33
- 66
0
votes
1 answer
How to apply a "Hex Digest" to a HMAC SHA256 hashed value in an Azure API Management policy?
I am trying to validate an API request from Slack as per the instructions here.
In summary the steps are:
Concatenate the request timestamp with a version and the request body.
Hash the above string with HMAC SHA256, then "Hex Digest" this.
Compare…

JackMorrison
- 37
- 7
0
votes
1 answer
How do I upload a file into google cloud storage using HTML forms?
I want to upload a file directly to a google cloud storage bucket from client side using HTML forms.
I tried the steps given at https://cloud.google.com/storage/docs/xml-api/post-object-forms
I created a policy document in the same template given in…

Abhinay
- 13
- 5
0
votes
0 answers
React native crypto-js and node js expected result different
I need to create hash using the hmac sha256 in react native, so far does not have any suitable library that give the same expected result. this is the code that I use in node.js:
var crypto = require('crypto');
hashMessage = 'hello';
…

Vyron
- 1