# Titanium.Utils

> The top-level Utils module, containing a set of JavaScript methods that are often useful when building applications.

- Source: https://titaniumsdk.com/docs/sdk/13.2.0/Titanium.Utils
- Titanium SDK version: 13.2.0
- Kind: module
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 0.9, iPhone 0.9, iPad 0.9, macOS 9.2.0
- Extends: Titanium.Module
- Inheritance: Titanium.Module > Titanium.Proxy

## Methods

### base64decode

- Platforms: Android, iPhone, iPad, macOS

Returns the specified data decoded from Base64.

The parameter can be a String, Ti.Blob or Ti.File (iOS since 7.0.2 and Android since 3.3.0).

Parameters:

- `obj` (String | Titanium.Blob | Titanium.Filesystem.File): Data to decode.

Returns: Titanium.Blob

### base64encode

- Platforms: Android, iPhone, iPad, macOS

Returns the specified data encoded to Base64.

The parameter can be a String, Ti.Blob or Ti.File (iOS since 7.0.2 and Android since 3.3.0).

Parameters:

- `obj` (String | Titanium.Blob | Titanium.Filesystem.File): Data to encode.

Returns: Titanium.Blob

### md5HexDigest

- Platforms: Android, iPhone, iPad, macOS

Returns a MD5 digest of the specified data as a hex-based String.

Parameters:

- `obj` (String | Titanium.Blob): Data to calculate.

Returns: String

### sha1

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 1.3.2

Returns a SHA-1 hash of the specified data as a hex-based String.

Parameters:

- `obj` (String | Titanium.Blob): Data to calculate.

Returns: String

### sha256

- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK 1.8.0

Returns a SHA-256 hash of the specified data as a hex-based String.

Parameters:

- `obj` (String | Titanium.Blob): Data to calculate.

Returns: String

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/13.2.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

