fix: expose ripemd160 hash from boringssl (#16454)

Ref #16195
This commit is contained in:
Jeremy Apthorp 2019-01-28 13:36:51 -08:00 committed by GitHub
parent d105dcc0d3
commit 138ba53511
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 118 additions and 5 deletions

View file

@ -428,6 +428,18 @@ describe('node feature', () => {
})
})
describe('crypto', () => {
it('should list the ripemd160 hash in getHashes', () => {
expect(require('crypto').getHashes()).to.include('ripemd160')
})
it('should be able to create a ripemd160 hash and use it', () => {
const hash = require('crypto').createHash('ripemd160')
hash.update('electron-ripemd160')
expect(hash.digest('hex')).to.equal('fa7fec13c624009ab126ebb99eda6525583395fe')
})
})
it('includes the electron version in process.versions', () => {
expect(process.versions)
.to.have.own.property('electron')