The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

INTERNATIONALIZATION (I18N)

You can use perldoc to read this document: perldoc README.

Last update: 2007-09-07

Introduction

Not done yet.

Access to the current password

In dofunction() , instead of accessing pwd->pwd and pwd->length, you need to access the pwd->cur string struct. This struct has the following fields:

bytes

The length of the string in bytes, excluding the final zero byte(s).

characters

The length of the string in characters, or -1 if this is not yet known. You can use pwdgen_strlen(pwd, pwd->cur); to set this field.

encoding

The encoding this string is in. Use pwdgen_encoding(pwd->cur->encoding) to get a readable name of the encoding.

content

A pointer to the raw bytes of the string.

The pwd->cur struct is read-only, if you want to modify if by either appending something to it, changing the encoding etc., then you MUST make a copy first:

        struct sPwdString *temp;

        temp = pwdgen_strcpy(pwd, pwd->cur);
        if (temp == NULL)
          {
          /* some error happened */
          }

Working with strings

To work with strings, a handful of routines exist. These enable you to duplicate/copy strings, to convert them to lower or upper case, or increase their buffer size, as well as convert the strings between different encodings.

For a full list see the embedded Doxygen documentation of src/main/pwd_conv.c.

AUTHOR

(c) Bundesamt fuer Sicherheit in der Informationstechnik 1998-2007.

The DiCoP Workerframe falls under the BSD license.

See the file LICENSE or http://www.bsi.de/ for more information.

Contact

Address: BSI Referat 123 Godesberger Allee 185-189 53175 Bonn Germany email: dicop @ bsi.bund.de (for public key see dicop.asc or web site)