[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Shared Secret with in a Soap process.
This appears to be a newer version of VB than anything I've worked with
(I haven't done VB coding in many years.) But, from what I can glean,
it's concatenating a bunch of strings, then creating an MD5 hash over them.
You should be able to do this, either with the cryptographic services
APIs, or with the openssl tools.
On 8/25/2011 3:55 PM, BBB Rhodes wrote:
>
>
> I need to get a token for a Shared Secret to acces a Web Service but
> can not fine anything in regards to using it within a soap request.
> I have done it by using a Password but since that is not hiden I need
> to change it.
>
>
> Below is an example if have for a VB code but i am using the iSeries.
>
>
> Does anyone know where I can find or know how to set up my soap to get
> the token for a shared secret?
>
>
> VB Example--------------------
>
> Private Function GetToken(ByVal User As String) As String
>
> If Token = "" Or User<> ContractAuthentication.User Then
>
> Dim MD5Input As String
>
> MD5Input = User& ":"
>
> MD5Input += ":"
>
> MD5Input += ":"
>
> MD5Input += GetTokenDate()& ":"
>
> MD5Input += "MD5:"
>
> MD5Input += SharedSecret
>
> Dim MD5Provider As New
> System.Security.Cryptography.MD5CryptoServiceProvider
>
> Dim Bytes As Byte() =
> System.Text.Encoding.UTF8.GetBytes(MD5Input)
>
> Bytes = MD5Provider.ComputeHash(Bytes)
>
> Token = Convert.ToBase64String(Bytes)
>
> ContractAuthentication.User = User
>
> End If
>
> Return Token
>
> End Function
> Best regards,
> B
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list. To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------