OP 15 September, 2019 - 01:25 PM
site:https://launch.stellar.org/#/login
python AES-256-GCM Scrypt
========================
user : motchinkhongba
=======================
request payload = user
response : {"username":"[email protected]","salt":"R1vo32WbKDCU5bVBtRgB7A==","kdfParams":"{\"algorithm\" : \ "scrypt \" ,\" bits\":256,\"n\":4096,\"r\":8,\"p\":1}","totpRequired":false}
=========================================================================================================
password : 1111111111
requset payload = {"username":"[email protected]","walletId":"RIAXumHD9524nYh8xpTUdywHR0BPu0u4OMuP69s/nrw="}
response : loggin succes
=========================================================================================================
anyone can help me, make a python script to get the value of "walletId"?
thank you very much and sorry for my bad english.
a piece of JS language, from the web is like this.
https://launch.stellar.org/scripts/app-72047e54.js
python AES-256-GCM Scrypt
========================
user : motchinkhongba
=======================
request payload = user
response : {"username":"[email protected]","salt":"R1vo32WbKDCU5bVBtRgB7A==","kdfParams":"{\"algorithm\" : \ "scrypt \" ,\" bits\":256,\"n\":4096,\"r\":8,\"p\":1}","totpRequired":false}
=========================================================================================================
password : 1111111111
requset payload = {"username":"[email protected]","walletId":"RIAXumHD9524nYh8xpTUdywHR0BPu0u4OMuP69s/nrw="}
response : loggin succes
=========================================================================================================
anyone can help me, make a python script to get the value of "walletId"?
thank you very much and sorry for my bad english.
a piece of JS language, from the web is like this.
https://launch.stellar.org/scripts/app-72047e54.js
Quote:Wallet.SETTINGS = {
PBKDF2: {
ITERATIONS: 1e3,
SIZE: 256
},
SCRYPT: {
N: Math.pow(2, 11),
r: 8,
p: 1,
SIZE: 256
},
CIPHER_NAME: "aes",
MODE: "gcm",
KEY_SIZE: 32
},
Wallet.deriveId = function(username, password) {
var deferred = $q.defer();
return setTimeout(function() {
var credentials = username.toLowerCase() + password
, salt = sjcl.codec.utf8String.toBits(credentials)
, id = sjcl.misc.scrypt(credentials, salt, Wallet.SETTINGS.SCRYPT.N, Wallet.SETTINGS.SCRYPT.r, Wallet.SETTINGS.SCRYPT.p, Wallet.SETTINGS.SCRYPT.SIZE / 8);
deferred.resolve(sjcl.codec.hex.fromBits(id))
}, 0),
deferred.promise
}
,
Wallet.deriveKey = function(id, username, password) {
var credentials = id + username.toLowerCase() + password
, salt = sjcl.codec.utf8String.toBits(credentials)
, key = sjcl.misc.scrypt(credentials, salt, Wallet.SETTINGS.SCRYPT.N, Wallet.SETTINGS.SCRYPT.r, Wallet.SETTINGS.SCRYPT.p, Wallet.SETTINGS.SCRYPT.SIZE / 8);
return sjcl.codec.hex.fromBits(key)
}
,
Wallet.deriveKeyBroken = function(id, username, password) {
var credentials = username.toLowerCase() + password
, salt = sjcl.codec.utf8String.toBits(credentials)
, key = sjcl.misc.scrypt(id + credentials, id + salt, Wallet.SETTINGS.SCRYPT.N, Wallet.SETTINGS.SCRYPT.r, Wallet.SETTINGS.SCRYPT.p, Wallet.SETTINGS.SCRYPT.SIZE / 8);
return sjcl.codec.hex.fromBits(key)
}