> -----Original Message-----
> From: M. Ranganathan [mailto:[email protected]] 
> Sent: Tuesday, December 01, 2009 4:14 PM
> To: Beeton, Carolyn (CAR:9D60)
> Cc: [email protected]
> Subject: Re: [sipX-dev] problem finding base64-decoded value 
> of shared secret
> 
> On Tue, Dec 1, 2009 at 2:34 PM, Carolyn Beeton 
> <[email protected]> wrote:
> > I am trying to generate a signed SipXauthIdentity header 
> from sipXbridge, and am stuck on the shared secret.
> >
> 
> Can you set the secret as a byte array ( not a String) and 
> then override the encode method to do the MessageDigest.
> 
> public setSecret(byte[] secret) {
>  this.secret = secret;
> }
> 
> @Override
> public String encode() {
>    MessageDigest digest = MessageDigest.getInstance("MD5");
>     headerName + ":" +  digest.digest(secret).....
> 
>    etc...
>    return encodedString;
> }
> 

Yes, this was the problem (in C++ we get away with decoding the secret
into a UtlString, but Java is too smart for that).  I have it working
now.

Thanks,
Carolyn
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to