All files / crypto/src/mipher HMAC_MD5.js

50% Statements 3/6
100% Branches 0/0
0% Functions 0/1
50% Lines 3/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25              1x 1x                             1x  
/**
 * Copyright (c) Benjamin Ansbach - all rights reserved.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
 
const MipherHMAC = require('mipher/dist/hmac').HMAC;
const MipherMD5 = require('./MD5Mipher');
 
/**
 * AES-CBC + ZeroPadding integration using the mipher library
 */
class HMAC_MD5 {
 
  static hash(key, data) {
    let m = new MipherHMAC(new MipherMD5());
 
    m.init(key);
    return m.digest(data);
  }
}
 
module.exports = HMAC_MD5;