Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
digest

digest method

Returns a Promise object that can digest data using the specified cryptographic hash algorithm.

Important  As of Microsoft Edge, this method returns a Promise object. See Web Cryptography API updates for more info.
IE11

 

Syntax

var retVal = SubtleCrypto.digest(algorithm, buffer);

Parameters

algorithm [in]

Type: any

algorithm to be used for digestion.

buffer [in, optional]

Type: ArrayBufferView

The data to be digested.

Return value

Type: Promise

A Promise object that will digest buffer's data.

Note  IE11 returns a CryptoOperation. See Web Cryptography API updates for more info.

Remarks

The digest method supports the following cryptographic algorithms:

  • SHA-1
  • SHA-256
  • SHA-384
  • SHA-512 (Microsoft Edge)

See also

SubtleCrypto

 

 

Show:
© 2015 Microsoft