Alaska Software Inc. - RandomKey
Username: Password:
AuthorTopic: RandomKey
Zdenko BielikRandomKey
on Tue, 24 Apr 2018 18:59:37 +0200
Hi,

I just tested RandomKey() function, but results are still empty strings.
Even if tested App.exe file did run with Normal or Admin privileges.
And same results with Xbase++ 1.9.355 or with 2.0...
OS: Win8/10

Why?

Regards,
                  Zdeno
Jonathan LeemingRe: RandomKey
on Tue, 24 Apr 2018 12:17:44 -0600
On 4/24/2018 10:59 AM, Zdenko Bielik wrote:
> Hi,
> 
> I just tested RandomKey() function, but results are still empty strings.
> Even if tested App.exe file did run with Normal or Admin privileges.
> And same results with Xbase++ 1.9.355 or with 2.0...
> OS: Win8/10
> 
> Why?
> 
> Regards,
>                   Zdeno
> 

Hi Zdeno,

It works fine for me using Xbase++ 2.0.918 and Windows 10 Pro.

How are you calling it?  I tried...

Randomkey() and got Incorrect number of arguments from compiler.
Randomkey(NIL) and got run time Wrong Parameter Type

The only way I have been able to get it to return an empty string was to 
pass a zero valued parameter for the desired key length...

nLen := 0
Randomkey(nLen) --> ""

nLen := 10
Randowmkey(nLen) --> a 10 byte random key string

Regards... Jonathan

jonathan.leeming@the-family-centre.com
Edmonton, Alberta, Canada
Zdenko BielikRe: RandomKey
on Tue, 24 Apr 2018 21:40:18 +0200
Hi,

I called it correctly:

wtf RandomKey( 4 ) - > "" (empty string)
&& wtf is debug command from eXpress++ lib

or

MsgBox( ">" + RandomKey( 4 ) + "<" + " - " + AllTrim( Str( Len( RandomKey( 
4 ) ) ) ) )
-> "" - 0 (empty string - 0)


hmmm, there is open pdr for this function:
http://www.alaska-software.com/scripts/waa001.dll?WAA_PACKAGE=PUBLICDTS&WAA_FORM=DISPLAYPDR&PDRID=6491

Alaska recommended it for calculating/saving hash values and it doesn't work 
on all systems/situations.

     Zdeno



"Jonathan Leeming" napísal v správe 
news:3368a141$299108e3$684c0d@news.alaska-software.com...

On 4/24/2018 10:59 AM, Zdenko Bielik wrote:
> Hi,
>
> I just tested RandomKey() function, but results are still empty strings.
> Even if tested App.exe file did run with Normal or Admin privileges.
> And same results with Xbase++ 1.9.355 or with 2.0...
> OS: Win8/10
>
> Why?
>
> Regards,
>                   Zdeno
>

Hi Zdeno,

It works fine for me using Xbase++ 2.0.918 and Windows 10 Pro.

How are you calling it?  I tried...

Randomkey() and got Incorrect number of arguments from compiler.
Randomkey(NIL) and got run time Wrong Parameter Type

The only way I have been able to get it to return an empty string was to
pass a zero valued parameter for the desired key length...

nLen := 0
Randomkey(nLen) --> ""

nLen := 10
Randowmkey(nLen) --> a 10 byte random key string

Regards... Jonathan

jonathan.leeming@the-family-centre.com
Edmonton, Alberta, Canada
Jonathan LeemingRe: RandomKey
on Tue, 24 Apr 2018 15:57:24 -0600
Hi Zdeno,

I checked out the PDR 6491 link and although it is still listed as open 
in version 2.00.726 release notes they make this as a closed item:

Ensure the function RandomKey properly works with user privileges. See 
PDR 6491 (xpprt1.dll) (W16CLK)

As I mentioned I'm using Xbase++ 2.00.918 which may explain why I'm not 
experiencing the same problem.  What version of Xbase 2.0 are you using?

Regards... Jonathan


On 4/24/2018 1:40 PM, Zdenko Bielik wrote:
> Hi,
> 
> I called it correctly:
> 
> wtf RandomKey( 4 ) - > "" (empty string)
> && wtf is debug command from eXpress++ lib
> 
> or
> 
> MsgBox( ">" + RandomKey( 4 ) + "<" + " - " + AllTrim( Str( Len( 
> RandomKey( 4 ) ) ) ) )
> -> "" - 0 (empty string - 0)
> 
> 
> hmmm, there is open pdr for this function:
> http://www.alaska-software.com/scripts/waa001.dll?WAA_PACKAGE=PUBLICDTS&WAA_FORM=DISPLAYPDR&PDRID=6491 
> 
> 
> Alaska recommended it for calculating/saving hash values and it doesn't 
> work on all systems/situations.
> 
>      Zdeno
> 
> 
> 
> "Jonathan Leeming" napísal v správe 
> news:3368a141$299108e3$684c0d@news.alaska-software.com...
> 
> On 4/24/2018 10:59 AM, Zdenko Bielik wrote:
>> Hi,
>>
>> I just tested RandomKey() function, but results are still empty strings.
>> Even if tested App.exe file did run with Normal or Admin privileges.
>> And same results with Xbase++ 1.9.355 or with 2.0...
>> OS: Win8/10
>>
>> Why?
>>
>> Regards,
>>                   Zdeno
>>
> 
> Hi Zdeno,
> 
> It works fine for me using Xbase++ 2.0.918 and Windows 10 Pro.
> 
> How are you calling it?  I tried...
> 
> Randomkey() and got Incorrect number of arguments from compiler.
> Randomkey(NIL) and got run time Wrong Parameter Type
> 
> The only way I have been able to get it to return an empty string was to
> pass a zero valued parameter for the desired key length...
> 
> nLen := 0
> Randomkey(nLen) --> ""
> 
> nLen := 10
> Randowmkey(nLen) --> a 10 byte random key string
> 
> Regards... Jonathan
> 


jonathan.leeming@the-family-centre.com
Edmonton, Alberta, Canada
Zdenko BielikRe: RandomKey
on Wed, 25 Apr 2018 07:17:55 +0200
> What version of Xbase 2.0 are you using?

2.00.906