[The Utilities object is available for use in the operating systems specified in the Requirements section.]
The Utilities object provides functionality for random number generation, conversions, and encoding and decoding from base64.
When to use
The Utilities object is used to perform the following tasks:
- Encode a string as base64 or decode a string from base64.
- Convert a binary-packed string to a byte array and vice versa.
- Convert a binary-packed string to a hexadecimal string and vice versa.
- Generate a secure random number.
- Convert local time to Coordinated Universal Time (Greenwich Mean Time) and vice versa.
The Utilities object has these types of members:
The Utilities object has these methods.
Decodes a string from base64.
Encodes a string as base64.
Converts a binary-packed string to an array of bytes.
Converts a binary-packed string to a hexadecimal string.
Converts an array of bytes to a binary-packed string.
Generates a secure random number.
Converts a hexadecimal string to a binary-packed string.
Converts the computer's local time to Coordinated Universal Time.
Converts Coordinated Universal Time to the computer's local time.
The Utilities object can be created, and it is safe for scripting. The ProgID for the Utilities object is CAPICOM.Utilities.1.
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP