Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Commit f3ddc50

Browse files
committed
crypto: add deprecation warnings
1 parent 5bfc89b commit f3ddc50

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/crypto.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ function sha256(buffer) {
2222

2323
// FIXME: Name not consistent with others
2424
function HmacSHA256(buffer, secret) {
25+
console.warn('Hmac* functions are deprecated for removal in 2.0.0, use node crypto instead')
2526
return crypto.createHmac('sha256', secret).update(buffer).digest()
2627
}
2728

2829
function HmacSHA512(buffer, secret) {
30+
console.warn('Hmac* functions are deprecated for removal in 2.0.0, use node crypto instead')
2931
return crypto.createHmac('sha512', secret).update(buffer).digest()
3032
}
3133

0 commit comments

Comments
 (0)