|
|
@@ -3,8 +3,10 @@
|
|
|
*/
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.signup;
|
|
|
|
|
|
+import java.security.NoSuchAlgorithmException;
|
|
|
+
|
|
|
import kr.co.zumo.app.lifeplus.model.Model;
|
|
|
-import kr.co.zumo.app.lifeplus.model.SuperModel;
|
|
|
+import kr.co.zumo.app.lifeplus.util.StringUtil;
|
|
|
|
|
|
/**
|
|
|
* SignUpPinModel
|
|
|
@@ -56,8 +58,15 @@ public class SignUpPinModel extends Model {
|
|
|
* @param pin
|
|
|
*/
|
|
|
public void savePin(String pin) {
|
|
|
- SuperModel.getInstance().savePinWithEncryption(pin);
|
|
|
- SignUpModelHelper.getInstance().setEncryptedPin(getPreferences().getEncryptedPin());
|
|
|
+// SuperModel.getInstance().savePinWithEncryption(pin);
|
|
|
+// SignUpModelHelper.getInstance().setEncryptedPin(getPreferences().getEncryptedPin());
|
|
|
+ String encryptedPin = null;
|
|
|
+ try {
|
|
|
+ encryptedPin = StringUtil.convertToSHA256(StringUtil.convertToMD5(pin));
|
|
|
+ } catch (NoSuchAlgorithmException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ SignUpModelHelper.getInstance().setEncryptedPin(encryptedPin);
|
|
|
}
|
|
|
|
|
|
public int getBackwardWarnStringId() {
|