Skip to content

Commit

Permalink
add self referencing sha256 test
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Sep 11, 2023
1 parent 6aa7c88 commit 41d8eac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hash/sha256.test.js
Expand Up @@ -9,6 +9,14 @@ import * as env from '../environment.js'
import * as array from '../array.js'
import * as f from '../function.js'

/**
* @param {t.TestCase} _tc
*/
export const testSelfReferencingHash = _tc => {
const hash = sha256.digest(string.encodeUtf8('The SHA256 for this sentence begins with: one, eight, two, a, seven, c and nine.'))
t.assert(buffer.toHexString(hash).startsWith('182a7c9'))
}

/**
* @param {t.TestCase} _tc
*/
Expand Down

0 comments on commit 41d8eac

Please sign in to comment.