crypto-helper/test/spec/hashing.js
Timo Hocker ecd0195aee
All checks were successful
continuous-integration/drone/push Build is passing
refactoring, asymmetric signatures and encryption
2021-01-06 15:13:44 +01:00

28 lines
652 B
JavaScript

'use strict';
const crypto = require ('../../index');
describe ('hashing', () => {
it ('sha512', () => {
const hash = crypto.hash_sha512 ('a', 'b');
expect (
hash
)
.toEqual (
// eslint-disable-next-line max-len
'2d408a0717ec188158278a796c689044361dc6fdde28d6f04973b80896e1823975cdbf12eb63f9e0591328ee235d80e9b5bf1aa6a44f4617ff3caf6400eb172d'
);
});
it ('checksum', () => {
const hash = crypto.checksum ('foo');
expect (
hash
)
.toEqual (
// eslint-disable-next-line max-len
'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
);
});
});