Improved readme, fixed log
This commit is contained in:
parent
0ff7bec589
commit
305bf90e85
@ -1,5 +1,4 @@
|
|||||||
## Webogram - Telegram UNOFFICIAL web application
|
## Webogram - Telegram UNOFFICIAL web application
|
||||||
=================================================
|
|
||||||
|
|
||||||
Telegram offers great [apps for mobile communication](https://www.telegram.org). It is based on the [MTProto protocol](https://core.telegram.org/protocol) and has an [Open API](http://core.telegram.org/api). I personally like Telegram for its speed and cloud-support (that makes a web app possible, unlike in the case of WA and others).
|
Telegram offers great [apps for mobile communication](https://www.telegram.org). It is based on the [MTProto protocol](https://core.telegram.org/protocol) and has an [Open API](http://core.telegram.org/api). I personally like Telegram for its speed and cloud-support (that makes a web app possible, unlike in the case of WA and others).
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ function aesEncrypt (bytes, keyBytes, ivBytes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function aesDecrypt (encryptedBytes, keyBytes, ivBytes) {
|
function aesDecrypt (encryptedBytes, keyBytes, ivBytes) {
|
||||||
dLog('AES decrypt start', encryptedBytes.length/*, bytesToHex(keyBytes), bytesToHex(ivBytes)*/);
|
// dLog('AES decrypt start', encryptedBytes.length/*, bytesToHex(keyBytes), bytesToHex(ivBytes)*/);
|
||||||
|
|
||||||
var decryptedWords = CryptoJS.AES.decrypt({ciphertext: bytesToWords(encryptedBytes)}, bytesToWords(keyBytes), {
|
var decryptedWords = CryptoJS.AES.decrypt({ciphertext: bytesToWords(encryptedBytes)}, bytesToWords(keyBytes), {
|
||||||
iv: bytesToWords(ivBytes),
|
iv: bytesToWords(ivBytes),
|
||||||
@ -237,7 +237,7 @@ function aesDecrypt (encryptedBytes, keyBytes, ivBytes) {
|
|||||||
|
|
||||||
var bytes = bytesFromWords(decryptedWords);
|
var bytes = bytesFromWords(decryptedWords);
|
||||||
|
|
||||||
dLog('AES decrypt finish');
|
// dLog('AES decrypt finish');
|
||||||
|
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -1088,7 +1088,7 @@ factory('MtpAuthorizer', function (MtpDcConfigurator, MtpRsaKeysManager, MtpSecu
|
|||||||
auth.pq = response.pq;
|
auth.pq = response.pq;
|
||||||
auth.fingerprints = response.server_public_key_fingerprints;
|
auth.fingerprints = response.server_public_key_fingerprints;
|
||||||
|
|
||||||
dLog('ResPQ', bytesToHex(auth.serverNonce), bytesToHex(auth.pq), auth.fingerprints);
|
// dLog('ResPQ', bytesToHex(auth.serverNonce), bytesToHex(auth.pq), auth.fingerprints);
|
||||||
|
|
||||||
auth.publicKey = MtpRsaKeysManager.select(auth.fingerprints);
|
auth.publicKey = MtpRsaKeysManager.select(auth.fingerprints);
|
||||||
|
|
||||||
@ -1306,7 +1306,7 @@ factory('MtpAuthorizer', function (MtpDcConfigurator, MtpRsaKeysManager, MtpSecu
|
|||||||
}
|
}
|
||||||
|
|
||||||
var serverSalt = bytesXor(auth.newNonce.slice(0, 8), auth.serverNonce.slice(0, 8));
|
var serverSalt = bytesXor(auth.newNonce.slice(0, 8), auth.serverNonce.slice(0, 8));
|
||||||
dLog('Auth successfull!', authKeyID, authKey, serverSalt);
|
// dLog('Auth successfull!', authKeyID, authKey, serverSalt);
|
||||||
|
|
||||||
auth.authKeyID = authKeyID;
|
auth.authKeyID = authKeyID;
|
||||||
auth.authKey = authKey;
|
auth.authKey = authKey;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user