Utilities

This service provides utilities for string encoding/decoding, date
formatting, JSON manipulation, and other miscellaneous tasks.

<br />

## Classes

| Name | Brief description |
|---|---|
| `https://developers.google.com/apps-script/reference/utilities/charset` | A typesafe enum for character sets. |
| `https://developers.google.com/apps-script/reference/utilities/digest-algorithm` | Selector of Digest algorithm. |
| `https://developers.google.com/apps-script/reference/utilities/mac-algorithm` | Selector of MAC algorithm |
| `https://developers.google.com/apps-script/reference/utilities/rsa-algorithm` | Selector of RSA algorithm |
| `https://developers.google.com/apps-script/reference/utilities/utilities` | This service provides utilities for string encoding/decoding, date formatting, JSON manipulation, and other miscellaneous tasks. |

## `https://developers.google.com/apps-script/reference/utilities/charset`

### Properties

| Property | Type | Description |
|---|---|---|
| `US_ASCII` | `Enum` | US ASCII charset. |
| `UTF_8` | `Enum` | UTF-8 charset. |

## `https://developers.google.com/apps-script/reference/utilities/digest-algorithm`

### Properties

| Property | Type | Description |
|---|---|---|
| `MD2` | `Enum` | MD2 algorithm |
| `MD5` | `Enum` | MD5 algorithm |
| `SHA_1` | `Enum` | SHA-1 algorithm |
| `SHA_256` | `Enum` | SHA-256 algorithm |
| `SHA_384` | `Enum` | SHA-384 algorithm |
| `SHA_512` | `Enum` | SHA-512 algorithm |

## `https://developers.google.com/apps-script/reference/utilities/mac-algorithm`

### Properties

| Property | Type | Description |
|---|---|---|
| `HMAC_MD5` | `Enum` |   |
| `HMAC_SHA_1` | `Enum` |   |
| `HMAC_SHA_256` | `Enum` |   |
| `HMAC_SHA_384` | `Enum` |   |
| `HMAC_SHA_512` | `Enum` |   |

## `https://developers.google.com/apps-script/reference/utilities/rsa-algorithm`

### Properties

| Property | Type | Description |
|---|---|---|
| `RSA_SHA_1` | `Enum` |   |
| `RSA_SHA_256` | `Enum` |   |

## `https://developers.google.com/apps-script/reference/utilities/utilities`

### Properties

| Property | Type | Description |
|---|---|---|
| `Charset` | `https://developers.google.com/apps-script/reference/utilities/charset` |   |
| `DigestAlgorithm` | `https://developers.google.com/apps-script/reference/utilities/digest-algorithm` |   |
| `MacAlgorithm` | `https://developers.google.com/apps-script/reference/utilities/mac-algorithm` |   |
| `RsaAlgorithm` | `https://developers.google.com/apps-script/reference/utilities/rsa-algorithm` |   |

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64Decode(String)` | `Byte[]` | Decodes a base-64 encoded string into a UTF-8 byte array. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64Decode(String,Charset)` | `Byte[]` | Decodes a base-64 encoded string into a byte array in a specific character set. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64DecodeWebSafe(String)` | `Byte[]` | Decodes a base-64 web-safe encoded string into a UTF-8 byte array. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64DecodeWebSafe(String,Charset)` | `Byte[]` | Decodes a base-64 web-safe encoded string into a byte array in a specific character set. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64Encode(Byte)` | `String` | Generates a base-64 encoded string from the given byte array. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64Encode(String)` | `String` | Generates a base-64 encoded string from the given string. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64Encode(String,Charset)` | `String` | Generates a base-64 encoded string from the given string in a specific character set. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64EncodeWebSafe(Byte)` | `String` | Generates a base-64 web-safe encoded string from the given byte array. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64EncodeWebSafe(String)` | `String` | Generates a base-64 web-safe encoded string from the given string. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#base64EncodeWebSafe(String,Charset)` | `String` | Generates a base-64 web-safe encoded string from the given string in a specific character set. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeDigest(DigestAlgorithm,Byte)` | `Byte[]` | Compute a digest using the specified algorithm on the specified `Byte[]` value. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeDigest(DigestAlgorithm,String)` | `Byte[]` | Compute a digest using the specified algorithm on the specified `String` value. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeDigest(DigestAlgorithm,String,Charset)` | `Byte[]` | Compute a digest using the specified algorithm on the specified `String` value with the given character set. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeHmacSha256Signature(Byte,Byte)` | `Byte[]` | Signs the provided value using HMAC-SHA256 with the given key. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeHmacSha256Signature(String,String)` | `Byte[]` | Signs the provided value using HMAC-SHA256 with the given key. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeHmacSha256Signature(String,String,Charset)` | `Byte[]` | Signs the provided value using HMAC-SHA256 with the given key and character set. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeHmacSignature(MacAlgorithm,Byte,Byte)` | `Byte[]` | Compute a message authentication code using the specified algorithm on the specified key and value. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeHmacSignature(MacAlgorithm,String,String)` | `Byte[]` | Compute a message authentication code using the specified algorithm on the specified key and value. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeHmacSignature(MacAlgorithm,String,String,Charset)` | `Byte[]` | Compute a message authentication code using the specified algorithm on the specified key and value. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeRsaSha1Signature(String,String)` | `Byte[]` | Signs the provided value using RSA-SHA1 with the given key. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeRsaSha1Signature(String,String,Charset)` | `Byte[]` | Signs the provided value using RSA-SHA1 with the given key and charset. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeRsaSha256Signature(String,String)` | `Byte[]` | Signs the provided value using RSA-SHA256 with the given key. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeRsaSha256Signature(String,String,Charset)` | `Byte[]` | Signs the provided value using RSA-SHA256 with the given key. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeRsaSignature(RsaAlgorithm,String,String)` | `Byte[]` | Signs the provided value using the specified RSA algorithm with the given key. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#computeRsaSignature(RsaAlgorithm,String,String,Charset)` | `Byte[]` | Signs the provided value using the specified RSA algorithm with the given key and charset. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#formatDate(Date,String,String)` | `String` | Formats date according to specification described in Java SE SimpleDateFormat class. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#formatString(String,Object...)` | `String` | Performs `sprintf`-like string formatting using '%'-style format strings. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#getUuid()` | `String` | Get a UUID as a string (equivalent to using the [`java.util.UUID.randomUUID()`](https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html) method). |
| `https://developers.google.com/apps-script/reference/utilities/utilities#gzip(BlobSource)` | `https://developers.google.com/apps-script/base/blob.html` | `gzip`-compresses the provided `https://developers.google.com/apps-script/base/blob.html` data and returns it in a new `https://developers.google.com/apps-script/base/blob.html` object. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#gzip(BlobSource,String)` | `https://developers.google.com/apps-script/base/blob.html` | `gzip`-compresses the provided `https://developers.google.com/apps-script/base/blob.html` data and returns it in a new `https://developers.google.com/apps-script/base/blob.html` object. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#newBlob(Byte)` | `https://developers.google.com/apps-script/base/blob.html` | Create a new Blob object from a byte array. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#newBlob(Byte,String)` | `https://developers.google.com/apps-script/base/blob.html` | Create a new Blob object from a byte array and content type. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#newBlob(Byte,String,String)` | `https://developers.google.com/apps-script/base/blob.html` | Create a new Blob object from a byte array, content type, and name. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#newBlob(String)` | `https://developers.google.com/apps-script/base/blob.html` | Create a new Blob object from a string. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#newBlob(String,String)` | `https://developers.google.com/apps-script/base/blob.html` | Create a new Blob object from a string and content type. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#newBlob(String,String,String)` | `https://developers.google.com/apps-script/base/blob.html` | Create a new Blob object from a string, content type, and name. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#parseCsv(String)` | `String[][]` | Returns a tabular 2D array representation of a CSV string. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#parseCsv(String,Char)` | `String[][]` | Returns a tabular 2D array representation of a CSV string using a custom delimiter. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#parseDate(String,String,String)` | `Date` | Parses the provided string date according to the specification described in the Java Standard Edition `SimpleDateFormat` class. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#sleep(Integer)` | `void` | Sleeps for specified number of milliseconds. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#ungzip(BlobSource)` | `https://developers.google.com/apps-script/base/blob.html` | Uncompresses a `https://developers.google.com/apps-script/base/blob.html` object and returns a `https://developers.google.com/apps-script/base/blob.html` containing the uncompressed data. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#unzip(BlobSource)` | `https://developers.google.com/apps-script/base/blob.html` | Takes a Blob representing a zip file and returns its component files. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#zip(BlobSource)` | `https://developers.google.com/apps-script/base/blob.html` | Creates a new Blob object that is a zip file containing the data from the Blobs passed in. |
| `https://developers.google.com/apps-script/reference/utilities/utilities#zip(BlobSource,String)` | `https://developers.google.com/apps-script/base/blob.html` | Creates a new Blob object that is a zip file containing the data from the Blobs passed in. |