Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Decrypt from Powerbuilder an ENCRYPT ASA9 string

3 posts in Powerscript Last posting was on 2009-12-26 16:12:24.0Z
"Carlos" Posted on 2009-12-23 12:42:54.0Z
From: "Carlos" <cadaov AT hotmail DOT com>
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Decrypt from Powerbuilder an ENCRYPT ASA9 string
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b32104e@forums-1-dub>
Date: 23 Dec 2009 04:42:54 -0800
X-Trace: forums-1-dub 1261572174 10.22.241.152 (23 Dec 2009 04:42:54 -0800)
X-Original-Trace: 23 Dec 2009 04:42:54 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27212
Article PK: 793621

I have created a webservice which returns the ENCRYPT of a string, using as
a parameter the key...
I'm planning on accessing that value from Powerbuilder, but I can't decrypt
it, I've tried using the crypto API
(http://www.rgagnon.com/pbdetails/pb-0170.html), but I'm not getting the
same result

example
text= TODO
key= 123

from asa9
result = 0xb991896fc7e3e2328dda8c5723c5a0566602f3ffca279e1d73aabd723d7a

from powerbuilder 7
result= ´o¸sçPQ]=:-

could I get any help?
thanks!!!

Carlos


Chris Keating (Sybase iAnywhere) Posted on 2009-12-23 19:31:49.0Z
From: "Chris Keating (Sybase iAnywhere)" <keating_nospam@sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.powerscript
Subject: Re: Decrypt from Powerbuilder an ENCRYPT ASA9 string
References: <4b32104e@forums-1-dub>
In-Reply-To: <4b32104e@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b327025$1@forums-1-dub>
Date: 23 Dec 2009 11:31:49 -0800
X-Trace: forums-1-dub 1261596709 10.22.241.152 (23 Dec 2009 11:31:49 -0800)
X-Original-Trace: 23 Dec 2009 11:31:49 -0800, vip152.sybase.com
Lines: 27
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27213
Article PK: 761765

Are you sure that your decrypt is using an AES compatible algorithm to
match that used in SA9?

Carlos wrote:
> I have created a webservice which returns the ENCRYPT of a string, using
> as a parameter the key...
> I'm planning on accessing that value from Powerbuilder, but I can't
> decrypt it, I've tried using the crypto API
> (http://www.rgagnon.com/pbdetails/pb-0170.html), but I'm not getting the
> same result
>
> example
> text= TODO
> key= 123
>
> from asa9
> result = 0xb991896fc7e3e2328dda8c5723c5a0566602f3ffca279e1d73aabd723d7a
>
> from powerbuilder 7
> result= ´o¸sçPQ]=:-
>
> could I get any help?
> thanks!!!
>
> Carlos


Roland Smith [TeamSybase] Posted on 2009-12-26 16:12:24.0Z
From: "Roland Smith [TeamSybase]" <topwiz.smith_at_comcast_dot_net>
Newsgroups: sybase.public.powerbuilder.powerscript
References: <4b32104e@forums-1-dub>
Subject: Re: Decrypt from Powerbuilder an ENCRYPT ASA9 string
X-Unsent: 1
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Vipre-Scanned: 08A3EDD80015CF08A3EF25
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4b3635e8$1@forums-1-dub>
Date: 26 Dec 2009 08:12:24 -0800
X-Trace: forums-1-dub 1261843944 10.22.241.152 (26 Dec 2009 08:12:24 -0800)
X-Original-Trace: 26 Dec 2009 08:12:24 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.powerscript:27215
Article PK: 761767

It looks like the asa9 output is Hex. You'll have to convert the hex values
within the string to the characters they represent and put that string
through the crypto api.

The first two characters of the asa9 string is '0x' which indicates Hex. The
next two are 'b9'. B9 converts to 185 in decimal. The character for this is
¹ (superscript 1). You can convert the number 185 to a character with the
Char function.

"Carlos" <cadaov AT hotmail DOT com> wrote in message
news:4b32104e@forums-1-dub...
>I have created a webservice which returns the ENCRYPT of a string, using as
>a parameter the key...
> I'm planning on accessing that value from Powerbuilder, but I can't
> decrypt it, I've tried using the crypto API
> (http://www.rgagnon.com/pbdetails/pb-0170.html), but I'm not getting the
> same result
>
> example
> text= TODO
> key= 123
>
> from asa9
> result = 0xb991896fc7e3e2328dda8c5723c5a0566602f3ffca279e1d73aabd723d7a
>
> from powerbuilder 7
> result= ´o¸sçPQ]=:-
>
> could I get any help?
> thanks!!!
>
> Carlos