hmacsha1

Base64 HMAC SHA1 String in VBA

人走茶凉 提交于 2019-12-17 21:28:14
问题 I'm trying to convert an ASP/VBScript OAuth library to VBA. One of the challenges is this line of code: Get_Signature = b64_hmac_sha1(strSecret, strBaseSignature) This function, b64_hmac_sha1 is actually a function contained in a JavaScript library. It appears to me that calling a JavaScript function from VBA is fairly impractical. Because I know so little about encryption, it's not even clear to me what this b64_hmac_sha1 function does. Is HMAC SHA1 different from SHA1? I half suspect I

CommonHMAC in Swift

别说谁变了你拦得住时间么 提交于 2019-12-17 02:29:23
问题 I'm trying to create a HMAC SHA-1 hash of a string in Swift but can't figure out how to interact with the APIs as it doesn't seem to be importing the CommonCrypto framework. I've tried various different forms of "import CommonCrypto" and creating a bridging header file but none of it made a difference. The odd thing is that if I create an Objective-C class, I'm able to interact with APIs without any problems, so this seems to be unique to Swift. Also if anyone could tell me what the

How to correctly convert TAG value to the right format so that to Verify HMAC?

帅比萌擦擦* 提交于 2019-12-14 03:26:01
问题 I'm working on HMAC generation and verifying to check data integrity. I can correctly generate the MAC value but when sending it through socket to another program for verification, I faced with formatting mismatch. I appreciate your support. Thanks. unsigned char* MAC(unsigned char* key,unsigned char* message) { unsigned char* result; unsigned int result_len = 32; int i; result = (unsigned char*) malloc(sizeof(char) * result_len); result = HMAC(EVP_sha256 (), key , strlen (key), message ,

Try To Code HMAC-SHA256 using C#.Net

拜拜、爱过 提交于 2019-12-14 00:32:11
问题 i try to coding HMAC-SHA256 Algorithm as Function HMAC (K,m) = H((K ⊕ opad) ∥ H((K ⊕ ipad) ∥ m)) where H is a cryptographic hash function, K is a secret key padded to the right with extra zeros to the input block size of the hash function, or the hash of the original key if it's longer than that block size, m is the message to be authenticated, ∥ denotes concatenation, ⊕ denotes exclusive or (XOR), opad is the outer padding (0x5c5c5c…5c5c, one-block-long hexadecimal constant), ipad is the

HmacSHA1 generates different signatures on different systems using same secret

旧街凉风 提交于 2019-12-13 20:09:44
问题 I have a jersey oauth provider that uses HmacSHA1 for signing/verifying requests. This works for my development & test platforms where client & server are both different physical systems. However, when I move to a production platform the HmacSHA1 algorithm (provider-side) returns a different value than the HmacSHA1 algorithm (client-side) using the same params & secret, and my oauth validation fails. The JDK (1.6.x) is the same exact version on both the provider and client for all platforms.

Generate a keyed hash value using the HMAC method with Google Apps Script

别说谁变了你拦得住时间么 提交于 2019-12-13 02:11:45
问题 Is there a way to create a hash value in Google Apps Script? Google Apps Script will run server side code in the .gs code file. The .gs file is written in JavaScript. Because JavaScript is mostly a client side language, and encrypting anything client side isn't secure, maybe something like HMAC for Javascript isn't available? When I do a web search on hmac in javascript the first thing I get is crypto-js . But it looks like I need to link to some services in <script> tags: <script src="http:/

HMAC SHA1 using the same value for key and message

老子叫甜甜 提交于 2019-12-12 01:35:21
问题 I'm working on some C# security code and was about to replace it when I saw that it was using the HMACSHA1 class. The code is used to hash a password for storing in the database. The thing that caught my eye was that it uses the password as the HMAC key which is exactly what is computing the hash for. So is using the data for both the key and the thing your hashing OK? Does this make the security stronger or weaker? psuedo code: string pwd = "My~!Cra2y~P@ssWord1#123$"; using (HMACSHA1 hasher

Invalid Signature Error when sending an authorization request to quickblox via post xml

ε祈祈猫儿з 提交于 2019-12-11 13:48:11
问题 I am trying to learn how to use a service called quickblox for my iphone app backend. I have run into a problem when validating my app's connection with the quickblox service though. In order to authorize the connection I need to get a token from quickblox by sending a post request that contains my app id, auth_key, timestamp, a nonce, and a signature. When I send the post request however, the server replies back with status code 422 that my signature is invalid. The signature is made by

hmacsha1 output hex strings different between vb.net and python

六眼飞鱼酱① 提交于 2019-12-11 08:19:20
问题 I am using HMACSHA1 in vb.net for message authentication in a webrequest. After getting a "(403) Forbidden" message from the server, I decided to see if my signature calculation in VB matched the calculation in the sample python code I was given. The hex strings were ever so similar, but not quite exactly the same. Note the two extra 0s in the py signature but not in the vb indicated by * below. I'm assuming the py example code is good and returns correct output, so getting the vb to match

Mac.getInstance() for HmacSHA1 taking ages to execute

99封情书 提交于 2019-12-11 04:54:50
问题 I've recently ran into a deployment issue with a call to Mac.getInstance("HmacSHA1") . It can take up to 10 minutes to execute that single call on this specific server, whilst on other machines its execution is instant. CPU usage also spikes during the call. Here's a bit of details on the server: OS: CentOS 5.6 Final (kernel 2.6.35.8-16, i686); JVM: Sun's JDK 1.6.0_25 (32bit); CPU: Intel Core2 Duo CPU (E8400@3.00GHz); Mem: 2GB of RAM; Dedicated physical server. Any clues on what might be the