crypto: add deprecation warnings
This commit is contained in:
parent
5bfc89b43d
commit
f3ddc508f1
1 changed files with 2 additions and 0 deletions
|
@ -22,10 +22,12 @@ function sha256(buffer) {
|
|||
|
||||
// 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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue