# Sha2Hash | Stacks.js 1.0.0 Library Reference
Documentation for Stacks.js 1.0.0 Library Reference

### Hierarchy

- Sha2Hash

### Implemented by

- WebCryptoSha2Hash

## Index

### Methods

- digest

## Methods

### digest

- digest(data: Buffer, algorithm?: "sha256" | "sha512"): Promise<Buffer>

- - Defined in packages/encryption/src/sha2Hash.ts:7

  #### Parameters

  - ##### data: Buffer

  - ##### Optional algorithm: "sha256" | "sha512"

  #### Returns Promise<Buffer>

Generated using TypeDoc