RSA BSAFE Cert-C Micro Edition

The power of PKI for the smallest of devices

Cryptographic Message I/O Formats

This section outlines the format of the cryptographic message data to read and/or write. The following table lists the data types to pass into value when calling R_CM_get_info().

Format String
R_CM_FORMAT_BINARY
  • "BIN"
  • "bin"
  • "DER"
  • "der"
  • R_CM_FORMAT_PEM
  • "PEM"
  • "pem"
  • R_CM_FORMAT_TEXT
  • "TEXT"
  • "text"
  • "TXT"
  • "txt"
  • The following table lists the strings that are produced by R_CM_FORMAT_to_string().

    Format String
    R_CM_FORMAT_BINARY "BIN"
    R_CM_FORMAT_PEM "PEM"
    R_CM_FORMAT_TEXT "TXT"

    The following table lists the data to pass into format_arg when calling R_CM_write() and R_CM_write_file().

    Format Format Argument
    R_CM_FORMAT_BINARY Ignored
    R_CM_FORMAT_PEM Cipher String:
  • NULL results in no encryption of the PEM output.
  • "DES-CBC".
  • "DES-EDE3-CBC".
    See PEM_CIPHER_STRING for a description of each string.
  • R_CM_FORMAT_TEXT Ignored

    Defines

    #define R_CM_FORMAT_BINARY
     Indicates that the format of the data is raw binary. More...

    #define R_CM_FORMAT_TEXT
     Indicates that the format of the data is text. More...

    #define R_CM_FORMAT_PEM
     Indicates that the format of the data is Privacy Enhances Mail (PEM) encoded. More...

    #define R_CM_FORMAT_STRING_BINARY
     Indicates that the string representation of the binary encoding format.

    #define R_CM_FORMAT_STRING_TEXT
     Indicates that the string representation of the text encoding format.

    #define R_CM_FORMAT_STRING_PEM
     Indicates that the string representation of the Privacy Enhanced Mail (PEM) encoding format.

    #define R_CM_FORMAT_MAX_STR_LENGTH
     Indicates that the maximum size of a buffer required for the output of R_CM_FORMAT_to_string().


    Define Documentation

    #define R_CM_FORMAT_BINARY
     

    Indicates that the format of the data is raw binary. The following table lists the usage of identifiers in R_CM_FORMAT string functions.

    Function String Description
    R_CM_FORMAT_from_string()
  • "BIN"
  • "bin"
  • "DER"
  • "der"
  • Represents a binary encoding format, commonly Distinguished Encoding Rules (DER) as a string.
    R_CM_FORMAT_to_string() "BIN" Represents the binary format identifier as a string.

    #define R_CM_FORMAT_PEM
     

    Indicates that the format of the data is Privacy Enhances Mail (PEM) encoded. PEM is a variation of a text format. The following table details the usage of identifiers in R_CM_FORMAT string functions.

    Function String Description
    R_CM_FORMAT_from_string()
  • "PEM"
  • "pem"
  • Represents the string as a PEM encoding format.
    R_CM_FORMAT_to_string() "BIN" Represents the PEM encoding format identifier as a string.

    #define R_CM_FORMAT_TEXT
     

    Indicates that the format of the data is text. The following table details the usage of identifiers in R_CM_FORMAT string functions.

    Function String Description
    R_CM_FORMAT_from_string()
  • "TEXT"
  • "text"
  • "TXT"
  • "txt"
  • Represents the string as a text encoding format.
    R_CM_FORMAT_to_string() "TXT" Represents the text format identifier as a string.


    Copyright (c) 1999-2002 RSA Security Inc. All rights reserved. 061-001007-100-001-000-3405 A1 - 1.0