# NodeCryptoSha2Hash | Stacks.js 1.4.1 Library Reference
Documentation for Stacks.js 1.4.1 Library Reference

### Hierarchy

- NodeCryptoSha2Hash

## Index

### Constructors

- constructor

### Properties

- createHash

### Methods

- digest

## Constructors

### constructor

- new NodeCryptoSha2Hash(createHash: (algorithm: string, options?: HashOptions) => Hash): NodeCryptoSha2Hash

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

  #### Parameters

  - ##### createHash: (algorithm: string, options?: HashOptions) => Hash

    - - (algorithm: string, options?: HashOptions): Hash

      - #### Parameters

        - ##### algorithm: string

        - ##### Optional options: HashOptions

        #### Returns Hash

  #### Returns NodeCryptoSha2Hash

## Properties

### createHash

createHash: (algorithm: string, options?: HashOptions) => Hash

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

#### Type declaration

- - (algorithm: string, options?: HashOptions): Hash

  - #### Parameters

    - ##### algorithm: string

    - ##### Optional options: HashOptions

    #### Returns Hash

## Methods

### digest

- digest(data: Buffer, algorithm?: string): Promise<Buffer>

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

  #### Parameters

  - ##### data: Buffer

  - ##### algorithm: string = 'sha256'

  #### Returns Promise<Buffer>

Generated using TypeDoc