mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-20 00:53:26 +02:00
Remove unused VNC authentication utilities.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user