Utilities object
[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.
Members
The Utilities object has these types of members:
Methods
The Utilities object has these methods.
Method | Description |
---|---|
Base64Decode | Decodes a string from base64. |
Base64Encode | Encodes a string as base64. |
BinaryStringToByteArray | Converts a binary-packed string to an array of bytes. |
BinaryToHex | Converts a binary-packed string to a hexadecimal string. |
ByteArrayToBinaryString | Converts an array of bytes to a binary-packed string. |
GetRandom | Generates a secure random number. |
HexToBinary | Converts a hexadecimal string to a binary-packed string. |
LocalTimeToUTCTime | Converts the computer's local time to Coordinated Universal Time. |
UTCTimeToLocalTime | Converts Coordinated Universal Time to the computer's local time. |
Remarks
The Utilities object can be created, and it is safe for scripting. The ProgID for the Utilities object is CAPICOM.Utilities.1.
Requirements
Requirement | Value |
---|---|
Redistributable |
CAPICOM 2.0 or later on Windows Server 2003 and Windows XP |
DLL |
|