swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
data type  

blowfish.state

 
 

Library: Blowfish (OMBLOWFISH)
Import: omblowfish.xmd


Purpose

The state opaque data type 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 state data type as you require. A instance of the state data type 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 Opaque Data Types for a general description of opaque data types and how they are used.

Related OMBLOWFISH library functions

The state data type 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
 
 

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

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.