Click here to Skip to main content
15,890,438 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionTrying to understand the nature of inherited windows forms.... Pin
Sam Marrocco7-Jan-15 5:26
Sam Marrocco7-Jan-15 5:26 
AnswerRe: Trying to understand the nature of inherited windows forms.... Pin
Eddy Vluggen7-Jan-15 5:56
professionalEddy Vluggen7-Jan-15 5:56 
AnswerRe: Trying to understand the nature of inherited windows forms.... Pin
bojammis7-Jan-15 15:15
professionalbojammis7-Jan-15 15:15 
GeneralRe: Trying to understand the nature of inherited windows forms.... Pin
Sam Marrocco8-Jan-15 2:54
Sam Marrocco8-Jan-15 2:54 
GeneralRe: Trying to understand the nature of inherited windows forms.... Pin
bojammis8-Jan-15 5:47
professionalbojammis8-Jan-15 5:47 
QuestionOutlook...vba to assign a UDF a value (attachment.filenames) Pin
Member 113499046-Jan-15 16:00
Member 113499046-Jan-15 16:00 
QuestionNew computer language creation using visual basic Pin
Member 113553585-Jan-15 22:50
Member 113553585-Jan-15 22:50 
QuestionHMAC Calculating for Request Header Pin
jkirkerx4-Jan-15 10:18
professionaljkirkerx4-Jan-15 10:18 
I'm not even coming close here on this one.
I copied and translated the code from a c-sharp example, and thought I got it right.
I have the formula right. This can't that hard to do. But I suspect it's my computing of the HMAC
This is my first time doing this, so I have no real experience at it.
[edit] - I wonder if my time is wrong

Formula
The HMAC is calculated with the SHA-1 algorithm on the following:
Request Method + \n
+ Content-type + \n
+ Content Digest (SHA-1) + \n
+ Sending Time + \n
+ Request URL
The sending time is expressed in ISO 8601 format, e.g: 2012-09-21T00:50:09Z.

Code:
'Build and assign values to hashing and header variables
Dim m_method As String = "POST"
Dim m_type As String = "application/xml"
'Dim m_time As String = DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ")
Dim m_time As String = "2015-01-04T20:51:54Z"
Dim m_uri As String = "/transaction/v12"
Dim m_hashData As String = m_method & "\n" & m_type & "\n" & hashed_content & "\n" & m_time & "\n" + m_uri

'Compute the HMAC and convert to a base64 hash
Dim m_hmac_sha1 As New HMACSHA1(Encoding.UTF8.GetBytes(m_key))
Dim m_hmac_data() As Byte = m_hmac_sha1.ComputeHash(Encoding.UTF8.GetBytes(m_hashData))
Dim m_base64_hash As String = Convert.ToBase64String(m_hmac_data)


Values I get
POST\napplication/xml\n748019bad47c6806d6608f5399ca02fc704c2f3b\n2015-01-04T20:51:54Z\n/transaction/v12

748019bad47c6806d6608f5399ca02fc704c2f3b
Ycow9SWOODIur4nVheKDnBc9dN0=

Correct Values
ContentDigest: 594f983e3e1cf31c379c85a2022b6cd50b715a43
HMAC: ANbd9PXgE1mEL0JI2XAYz881sA8=
GeneralLost in translation? Pin
jkirkerx5-Jan-15 10:57
professionaljkirkerx5-Jan-15 10:57 
Answer[SOLVED] Pin
jkirkerx5-Jan-15 12:34
professionaljkirkerx5-Jan-15 12:34 
GeneralRe: [SOLVED] Pin
Member 149534685-Aug-21 5:50
Member 149534685-Aug-21 5:50 
GeneralRe: [SOLVED] Pin
jkirkerx5-Aug-21 6:22
professionaljkirkerx5-Aug-21 6:22 
QuestionHow to make a youtube downloader in vb.net Pin
Anupama Rhiyas1-Jan-15 21:41
Anupama Rhiyas1-Jan-15 21:41 
AnswerRe: How to make a youtube downloader in vb.net Pin
Richard MacCutchan1-Jan-15 22:30
mveRichard MacCutchan1-Jan-15 22:30 
AnswerRe: How to make a youtube downloader in vb.net Pin
Simon_Whale1-Jan-15 22:46
Simon_Whale1-Jan-15 22:46 
QuestionVB 2013 Community (Transparent Text Control) Pin
peskykid821-Jan-15 15:17
professionalpeskykid821-Jan-15 15:17 
GeneralRe: VB 2013 Community (Transparent Text Control) Pin
PIEBALDconsult1-Jan-15 15:48
mvePIEBALDconsult1-Jan-15 15:48 
AnswerRe: VB 2013 Community (Transparent Text Control) Pin
Eddy Vluggen5-Jan-15 7:17
professionalEddy Vluggen5-Jan-15 7:17 
Questionann Pin
Member 1134553331-Dec-14 8:32
Member 1134553331-Dec-14 8:32 
AnswerRe: ann Pin
Dave Kreskowiak31-Dec-14 15:46
mveDave Kreskowiak31-Dec-14 15:46 
Questionhow to extract a sample from template dpfp visual basic .net 4.0 Pin
Member 1118030631-Dec-14 5:32
Member 1118030631-Dec-14 5:32 
AnswerRe: how to extract a sample from template dpfp visual basic .net 4.0 Pin
Eddy Vluggen5-Jan-15 7:20
professionalEddy Vluggen5-Jan-15 7:20 
Questionfilter records from ms access 2010 by vba Pin
Virendra Singh Bhanu30-Dec-14 16:40
Virendra Singh Bhanu30-Dec-14 16:40 
AnswerRe: filter records from ms access 2010 by vba Pin
Eddy Vluggen5-Jan-15 7:23
professionalEddy Vluggen5-Jan-15 7:23 
QuestionUsing a wsdl with HMAC Pin
jkirkerx30-Dec-14 12:53
professionaljkirkerx30-Dec-14 12:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.