crypto: remove Hmac* exposure in API
This commit is contained in:
parent
bdb372da7d
commit
08cc8f8621
3 changed files with 48 additions and 143 deletions
src
|
@ -20,23 +20,10 @@ function sha256 (buffer) {
|
|||
return crypto.createHash('sha256').update(buffer).digest()
|
||||
}
|
||||
|
||||
// FIXME: Name not consistent with others
|
||||
function HmacSHA256 (buffer, secret) {
|
||||
console.warn('Hmac* functions are deprecated for removal in 2.0.0, use node crypto instead')
|
||||
return crypto.createHmac('sha256', secret).update(buffer).digest()
|
||||
}
|
||||
|
||||
function HmacSHA512 (buffer, secret) {
|
||||
console.warn('Hmac* functions are deprecated for removal in 2.0.0, use node crypto instead')
|
||||
return crypto.createHmac('sha512', secret).update(buffer).digest()
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
ripemd160: ripemd160,
|
||||
sha1: sha1,
|
||||
sha256: sha256,
|
||||
hash160: hash160,
|
||||
hash256: hash256,
|
||||
HmacSHA256: HmacSHA256,
|
||||
HmacSHA512: HmacSHA512
|
||||
ripemd160: ripemd160,
|
||||
sha1: sha1,
|
||||
sha256: sha256
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue