WS-Management > Support for WS-Management in Intel AMT > DSP0230: WS-CIM Mapping Specification
CollapseAll image

DSP0230: WS-CIM Mapping Specification

As stated in the specification introduction:
“This specification provides the normative rules and recommendations that describe the structure of the XML Schema, WSDL fragments, and metadata fragments that correspond to the elements of CIM models, and the representation of CIM instances as XML instance documents.”

Intel AMT follows these rules and recommendations. Here are some specifics of interest:

Base 64 formatting

Intel AMT complies with the Mapping Specification for representing octet strings in base 64. Intel AMT follows the definition in

According to this definition, there are only specific characters which can come before the base64 padding at the end of base64 format encoded data.

   If there is no “=” padding – there are no base64 character restrictions.

   If there is one “=” – the character before the padding must be one of [AEIMQUYcgkosw048].

   If there are two “=” - the character before the padding must be one of [AQgw].

The standard does not allow for special or control characters in the base 64 string. As the standard states, “The ·lexical representations· of base64Binary values are limited to the 65 characters of the Base64 Alphabet defined in [RFC 3548], i.e., a-z, A-Z, 0-9, the plus sign (+), the forward slash (/) and the equal sign (=), together with the space character (#x20). No other characters are allowed.”

Before Release 7.0, Intel AMT did not enforce these rules, resulting in a possible misinterpretation of the string. Starting with Release 7.0, a base64-encoded string that does not comply with these rules will be rejected.

For example, the GUID 03020100-0504-0706-0809-0A0B0C0D0E0F converts to “AAECAwQFBgcICQoLDA0ODw==” in  Base64.


Script demonstrating Hex to Base 64 conversion

The following script demonstrates a hex to base 64 conversion: It gets a hex string as an argument and returns a base64 string.

#this script receives a hex string as an argument


$hexChars = "0123456789ABCDEF"


$hexTable  =   (("0","0000"),


















$base64Table = (("A","000000"),

































































#converts one hex char to binary

function HexCharToBin ([string]$ch)


  for($i = 0; $i -lt $hexTable.Count; $i++)


    if ($ch -eq $hexTable[$i][0])


          return $hexTable[$i][1]



  throw "'{0}' is not a hex character." -f $ch



#converts hex chars to binary

function HexStrToBin ([string]$str)


  $result = ""

  foreach ($ch in $str.ToCharArray())


    $result += HexCharToBin($ch)


  return $result



#converts 6 bit chars to base64 char

function BinToBase64Char([string]$bin)


  for ($i = 0; $i -lt $base64Table.Count; $i++)


    if ($bin -eq $base64Table[$i][1])


          return $base64Table[$i][0]



  throw "Binary sequence is invalid" #needs to be 6 bit characters



#converts a multiplication of 6 bit chars

function BinToBase64Str ([string]$bin)


  if ($bin.Length % 6 -ne 0)


    throw "Invalid binary length."


  [string]$result = ""

  $binArray = $bin.ToCharArray()

  for($i = 0; $i -lt $bin.Length; $i+=6)


    $BinCh = $binArray[$i] + $binArray[$i+1]+ $binArray[$i+2]+ $binArray[$i+3]+ $binArray[$i+4]+ $binArray[$i+5]

    $result += BinToBase64Char ($BinCh)


  return $result




#remove spaces

[string]$hexInput = $args

$hexInput = $hexInput.Trim().Replace(" ","")


#region check if input is valid


#1. length is even - for hex

if ($hexInput.Length % 2 -eq 1)


  throw "Invalid input - needs to be even string."



#2. only legal chars

foreach($ch in $hexInput.ToCharArray())


  $legal = 0

  foreach($hexCh in $hexChars.ToCharArray())


    if( $ch -eq $hexCh)


          $legal = 1




  if ($legal -eq 0)


    throw "Invalid input - some of the argument characters are not hex characters."






[Char[]]$hexArr = $hexInput.ToCharArray() #array of hex characters

[string]$base64Result = ""


for ($i = 0; $i -lt $hexInput.Length; $i+=6)


  if($hexInput.Length - $i -ge 6) #check if there are at least 3 bytes left


    $hexSection = $hexArr[$i]+$hexArr[$i+1]+$hexArr[$i+2]+$hexArr[$i+3]+$hexArr[$i+4]+$hexArr[$i+5]

    $base64Result += (BinToBase64Str (HexStrToBin $hexSection))




    switch ($hexInput.Length  % 6)


          2 #one byte left at the end (2 hex chars)


                $hexSection = $hexArr[$i]+$hexArr[$i+1]

                [string]$temp = (BinToBase64Str ((HexStrToBin $hexSection)+"0000"))

                $base64Result += $temp.get_Chars(0)+$temp.get_Chars(1)+"=="


          4 #two bytes left at the end (4 hex chars)


                $hexSection = $hexArr[$i]+$hexArr[$i+1]+$hexArr[$i+2]+$hexArr[$i+3]

                 [string]$temp = (BinToBase64Str ((HexStrToBin $hexSection)+"00"))

                $base64Result += $temp.get_Chars(0)+$temp.get_Chars(1)+$temp.get_Chars(2)+"="





write-host $base64Result



DSP0230 defines five possible formats for cimDateTime. The details of the formats are specified in Intel AMT implements two of these formats - the xs:dateTime and xs:duration formats. The duration format is referred to as “interval” in the SDK. Using any of the other formats will result in an “unsupported format” error. The formats are used as part of the alarm clock functionality. Intel AMT requires the xs:dateTime to contain a timezone value (always “Z”) and always returns “Z”.

Copyright © 2006-2013, Intel Corporation. All rights reserved.