@@ -0,0 +1,2285 @@
+/*%0A * Copyright 2014 http://Bither.net%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage net.bither.bitherj.crypto;%0A%0A%0Aimport net.bither.bitherj.core.Address;%0Aimport net.bither.bitherj.exception.AddressFormatException;%0Aimport net.bither.bitherj.utils.Base58;%0Aimport net.bither.bitherj.utils.PrivateKeyUtil;%0Aimport net.bither.bitherj.utils.QRCodeUtil;%0Aimport net.bither.bitherj.utils.Utils;%0A%0A%0Apublic class PasswordSeed %7B%0A    private String address;%0A    private String keyStr;%0A    private ECKey ecKey;%0A%0A    public PasswordSeed(String str) %7B%0A        int indexOfSplit = QRCodeUtil.indexOfOfPasswordSeed(str);%0A        this.address = QRCodeUtil.getAddressFromPasswordSeed(str);%0A        this.keyStr = str.substring(indexOfSplit + 1);%0A    %7D%0A%0A    public PasswordSeed(Address address) %7B%0A        this.address = address.getAddress();%0A        this.keyStr = address.getEncryptPrivKey();%0A    %7D%0A%0A    public boolean checkPassword(CharSequence password) %7B%0A        this.ecKey = PrivateKeyUtil.getECKeyFromSingleString(keyStr, password);%0A        if (this.ecKey == null) %7B%0A            return false;%0A        %7D%0A%0A        return Utils.compareString(this.address,%0A                this.ecKey.toAddress());%0A%0A    %7D%0A%0A    public ECKey getECKey() %7B%0A        return this.ecKey;%0A    %7D%0A%0A    public String getAddress() %7B%0A        return this.address;%0A    %7D%0A%0A    public String toPasswordSeedString() %7B%0A        try %7B%0A            String passwordSeedString = Base58.bas58ToHexWithAddress(this.address) + QRCodeUtil.QR_CODE_SPLIT%0A                    + QRCodeUtil.getNewVersionEncryptPrivKey(this.keyStr);%0A            return passwordSeedString;%0A        %7D catch (AddressFormatException e) %7B%0A            throw new RuntimeException(%22passwordSeed  address is format error ,%22 + this.address);%0A%0A        %7D%0A%0A    %7D%0A%0A%0A%7D%0A

remove PasswordSeeed