Skip to content

Commit

Permalink
Update warning
Browse files Browse the repository at this point in the history
  • Loading branch information
guimard committed Sep 3, 2019
1 parent b6f264d commit 0941c74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/packages/lemonldap-ng-conf/lib/crypto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class Crypto
s = Buffer.concat [s, Buffer.allocUnsafe(l).fill "\0"]
iv = this.newIv()
cipher = new @aesjs.ModeOfOperation.cbc @rk, iv
# TODO: unshift iv, encrypt(hmac+data)
buf = Buffer.concat [iv, cipher.encrypt s]
res = Buffer(buf).toString 'base64'
res
Expand All @@ -49,7 +48,7 @@ class Crypto
if hmac.equals new sha('sha256').update(res).digest()
return res
else
console.error "Bad hmac, ignored for now due to unknown bug"
console.log "Bad hmac, ignored for now due to unknown Perl/JS incompatibility"
return res

module.exports = Crypto

0 comments on commit 0941c74

Please sign in to comment.