swirl
Guide to OmniMark 8   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
OMX  

blowfish.state

 
 

Library: Blowfish (OMBLOWFISH)
Import: omblowfish.xmd


Purpose

The state OMX component carries state information between calls to the functions of the OMBLOWFISH library. A state also contains information about the encryption key being used to encrypt or decrypt the data.

Usage Notes

Within your program, you can create as many instances of the stateOMX component as you require. A instance of the state OMX component can be declared as a global, local, or even passed as an argument to a function.

A particular instance of statemust be initialized using blowfish.set-encryption-key before being used.

Please refer to OMX Components for a general description of OMX components and how they are used.

Related OMBLOWFISH library functions

The state OMX component is central to the OMBLOWFISH library, and is used by all of its functions.

Example

Once you have declared an instance of blowfish.state, you must initialize it using blowfish.set-encryption-key.

     import "omblowfish.xmd" prefixed by blowfish.
  
  
     process
        local blowfish.state state
  
        set-encryption-key ("ENCRYPTION KEY", state)

The OMBLOWFISH library exports a conversion function from string to state that can be used to write this example more concisely:

     import "omblowfish.xmd" prefixed by blowfish.
  
  
     process
        local blowfish.state state initial { "ENCRYPTION KEY" }

        Other Library Functions
   blowfish.decode
   blowfish.encode
   blowfish.set-encryption-key
   blowfish.state
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 8.2.0 Documentation Generated: March 13, 2008 at 3:27:39 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2008.