mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
Remove unused VNC authentication utilities.
This commit is contained in:
parent
e68d8564f4
commit
5216eac5ce
2 changed files with 4 additions and 18 deletions
|
@ -36,23 +36,6 @@ function encrypt(challenge, password) {
|
|||
|
||||
module.exports.encrypt = encrypt
|
||||
|
||||
function decrypt(challenge, password) {
|
||||
var key = normalizePassword(password)
|
||||
, iv = new Buffer(0).fill(0)
|
||||
|
||||
// Note: do not call .final(), .update() is the one that gives us the
|
||||
// desired result.
|
||||
return crypto.createDecipheriv('des-ecb', key, iv).update(challenge)
|
||||
}
|
||||
|
||||
module.exports.decrypt = decrypt
|
||||
|
||||
function format(fingerprint) {
|
||||
return fingerprint.toString('hex').match(/\w{4}/g).join(':')
|
||||
}
|
||||
|
||||
module.exports.format = format
|
||||
|
||||
function verify(response, challenge, password) {
|
||||
return encrypt(challenge, password).equals(response)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue