SHA256
should be a function.
testString: assert(typeof SHA256 === 'function');
- text: SHA256("Rosetta code")
should return a string.
testString: assert(typeof SHA256("Rosetta code") === 'string');
- text: SHA256("Rosetta code")
should return "764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf"
.
testString: assert.equal(SHA256("Rosetta code"), "764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf");
- text: SHA256("SHA-256 Hash")
should return "bee8c0cabdcf8c7835f40217dd35a8b0dba9134520e633f1c57285f35ca7ee3e"
.
testString: assert.equal(SHA256("SHA-256 Hash"), "bee8c0cabdcf8c7835f40217dd35a8b0dba9134520e633f1c57285f35ca7ee3e");
- text: SHA256("implementation")
should return "da31012c40330e7e21538e7dd57503b16e8a0839159e96137090cccc9910b171"
.
testString: assert.equal(SHA256("implementation"), "da31012c40330e7e21538e7dd57503b16e8a0839159e96137090cccc9910b171");
- text: SHA256("algorithm")
should return "b1eb2ec8ac9f31ff7918231e67f96e6deda83a9ff33ed2c67443f1df81e5ed14"
.
testString: assert.equal(SHA256("algorithm"), "b1eb2ec8ac9f31ff7918231e67f96e6deda83a9ff33ed2c67443f1df81e5ed14");
- text: SHA256("language")
should return "a4ef304ba42a200bafd78b046e0869af9183f6eee5524aead5dcb3a5ab5f8f3f"
.
testString: assert.equal(SHA256("language"), "a4ef304ba42a200bafd78b046e0869af9183f6eee5524aead5dcb3a5ab5f8f3f");
```