fix: backport patch to sync exposed crypto (#16822)

* fix: backport patch to sync exposed crypto

* add two new specs

* fix iv length

* fix formatting
This commit is contained in:
Shelley Vohr 2019-02-12 11:57:11 -08:00 committed by GitHub
parent 5478cc7e8e
commit cfba59929a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 96 additions and 0 deletions

View file

@ -462,6 +462,16 @@ describe('node feature', () => {
it('should be able to create an aes-256-cfb cipher', () => {
require('crypto').createCipheriv('aes-256-cfb', '0123456789abcdef0123456789abcdef', '0123456789abcdef')
})
it('should list des-ede-cbc in getCiphers', () => {
expect(require('crypto').getCiphers()).to.include('des-ede-cbc')
})
it('should be able to create an des-ede-cbc cipher', () => {
const key = Buffer.from('0123456789abcdeff1e0d3c2b5a49786', 'hex')
const iv = Buffer.from('fedcba9876543210', 'hex')
require('crypto').createCipheriv('des-ede-cbc', key, iv)
})
})
it('includes the electron version in process.versions', () => {