Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
epgsql
0002-switch-to-crypto-mac-4-since-crypto-hmac-3...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-switch-to-crypto-mac-4-since-crypto-hmac-3-is-deprec.patch of Package epgsql
From 67ee08f78168fb5635d0c73245240e5f9500dd5d Mon Sep 17 00:00:00 2001 From: Nicolas Martyanoff <khaelin@gmail.com> Date: Sat, 18 Jul 2020 11:54:52 +0200 Subject: [PATCH] switch to crypto:mac/4 since crypto:hmac/3 is deprecated close #235 --- src/epgsql_scram.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/epgsql_scram.erl b/src/epgsql_scram.erl index b1c5910..afcbf97 100644 --- a/src/epgsql_scram.erl +++ b/src/epgsql_scram.erl @@ -116,8 +116,18 @@ hi1(Str, U, Hi, I) -> Hi1 = bin_xor(Hi, U2), hi1(Str, U2, Hi1, I - 1). +-ifdef(OTP_RELEASE). +-if(OTP_RELEASE >= 23). +hmac(Key, Str) -> + crypto:mac(hmac, sha256, Key, Str). +-else. hmac(Key, Str) -> crypto:hmac(sha256, Key, Str). +-endif. +-else. +hmac(Key, Str) -> + crypto:hmac(sha256, Key, Str). +-endif. h(Str) -> crypto:hash(sha256, Str). -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor