# Compute a SHA-256 Digest

## Overview

Computes the SHA-256 digest of the input and returns the result as a lowercase hexadecimal string.

## Prerequisites

Instantiate the library with `Server.CreateObject("G3CRYPTO")`.

## Syntax

```asp
result = crypto.SHA256(input)
```

## Parameters

| Parameter | Type | Required | Description |
|---|---|---|---|
| **input** | String or Array | No | Input data as text or a VBScript byte array. When omitted, the method hashes an empty string. |

## Return Value

- **String**: 64-character lowercase hexadecimal SHA-256 digest.

## Remarks

- SHA-256 is a recommended default for modern integrity checks.
- The method accepts both textual input and binary arrays.
- Method names are case-insensitive.

## Example

```asp
<%
Option Explicit
Dim crypto, digest
Set crypto = Server.CreateObject("G3CRYPTO")

digest = crypto.SHA256("Hello, AxonASP!")
Response.Write digest

Set crypto = Nothing
%>
```

## API Reference

- **Object**: `G3CRYPTO`
- **Method**: `SHA256`
- **Arguments**: `input` (String or Array, optional)
- **Returns**: String — 64-character lowercase hexadecimal digest
