In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Reader's Clinic - Changed SEC for 3.0

Jens Diederichs writes "Has anybody been playing with the revised (for AREV 3.0) version of SEC() yet? I used to be able to use the SEC(6) call to encrypt passwords as per RevMedia Vol 1 Issue 6. Some calls to SEC (such as 7) still work. A '6' call still works from a window but from TCL falls over. There is obviously something very simple here that I am missing - any guesses?"

As Jens noted, SEC has fundamentally changed for version 3. This is a function of a number of things - not least of which is that security had been harmonised and centralised in the system. SEC still takes 1 parameter but instead of a range of 1 to 12, the parameters can now be from 1 to 19. In addition SEC expects to always find Window_Common% loaded. If you wish to call it from your own program (not from a window) you must load a modified version of Window_Common% in which the WC_W% array is dimmed to a number rather than WC_WCnt%, then you must ClearCommon. Note also that some of the operations only make sense from a window and that these operations will require full Window_Common%.

CODE   ACTION
컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴
 1     Closes window if application is not SYSPROG.

 2     Provides a popup of valid usernames. If WC_Register%(1) is loaded
       with an account name (see 18) then only users for this account will
       be displayed.

 3     Provides a popup of valid applications

 4     Provides a popup of valid environments

 5     Calls the ACCOUNTLOGTO window and permits the alteration of
       characteristics of the logto password. Note that it expects @Record
       to be loaded with the Application row from SysEnv with Field 1
       replaced with the Application name rather than the word "ACCOUNT".
       For details of how to load @Record in this fashion see the
       documentation on SECUREACCOUNT_SUB later in this issue. Note that
       this call will only work in SYSPROG.

 6     Encrypts contents of @Ans

 7     Used as an Oconv to display "<Encrypted>" message

 8     Used to load a User row into the current row from a window. Place on
       the post prompt process of the username prompt and @Record will be
       loaded from that SysEnv row. This works from any account.

 9     Used to save a User row as loaded by 8. This only works from SysProg.

 10    Used to load an Application row into the current row from a window.
       Place on the post prompt process of the application name prompt and
       @Record will be loaded from that SysEnv row. This works from any
       account.

 11    Used to save an application row as loaded by 10. This only works from
       SysProg.

 12    Used to validate an entry as a valid application name. Used as an
       edit pattern, it will set Status() accordingly and display an error
       message if the entry in @Ans is not an application.

 13    This is used by a large number of SysWindows and is therefore
       probably "Kill if RunTime" but until a 3.0 RunTime is available it
       will not be possible to test this.

 14    Calls the ACCOUNTADVANCED window and permits the alteration of
       characteristics of the application. Note that it expects @Record to
       be loaded with the Application row from SysEnv with Field 1 replaced
       with the Application name rather than the word "ACCOUNT".  For
       details of how to load @Record in this fashion see the documentation
       on SECUREACCOUNT_SUB later in this issue. Note that this call will
       only work in SYSPROG.

 15    Used to delete an account or user. Only works in SysProg.

 16    Takes the value of @Ans and ensures that it is a valid location by
       truncating any directory name to 8 characters. Used as an edit
       pattern, looks for its input in @Ans. Therefore C:\AREV\TEST123456
       would be returned as C:\AREV\TEST1234.

 17    Used by the Account window to warn you if you change a location that
       you have to move the Dos files as well. (B276)

 18    Used by the AccountUser window on a post initialise when looking at
       the users for an application. Seems only to load WC_Register%(1) with
       the name of the application.

 19    Used by Account window to call AccountUser window.
(Volume 4, Issue 6, Pages 5,6)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel