當前位置: 首頁>>代碼示例>>Java>>正文


Java Bip38.decrypt方法代碼示例

本文整理匯總了Java中net.bither.bitherj.crypto.bip38.Bip38.decrypt方法的典型用法代碼示例。如果您正苦於以下問題:Java Bip38.decrypt方法的具體用法?Java Bip38.decrypt怎麽用?Java Bip38.decrypt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.bither.bitherj.crypto.bip38.Bip38的用法示例。


在下文中一共展示了Bip38.decrypt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getBIP38PrivateKeyString

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
public static String getBIP38PrivateKeyString(Address address, CharSequence password) throws
        AddressFormatException, InterruptedException {
    SecureCharSequence decrypted = getDecryptPrivateKeyString(address.getFullEncryptPrivKey()
            , password);
    String bip38 = Bip38.encryptNoEcMultiply(password, decrypted.toString());
    if (BitherjSettings.DEV_DEBUG) {
        SecureCharSequence d = Bip38.decrypt(bip38, password);
        if (d.equals(decrypted)) {
            log.info("BIP38 right");
        } else {
            throw new RuntimeException("BIP38 wrong " + d.toString() + " , " +
                    "" + decrypted.toString());
        }
    }
    decrypted.wipe();
    return bip38;
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:18,代碼來源:PrivateKeyUtil.java

示例2: testDecryptNoCompressionWithEcMultiplyWithLot2

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyWithLot2() throws InterruptedException, UnsupportedEncodingException, AddressFormatException {
    // "MOLON LABE" using greek characters  = "ΜΟΛΩΝ ΛΑΒΕ"
    String passphrase = "\u039C\u039F\u039B\u03A9\u039D \u039B\u0391\u0392\u0395";
    assertEquals("ce9cce9fce9bcea9ce9d20ce9bce91ce92ce95".toUpperCase(), Utils.bytesToHexString(passphrase.getBytes("UTF-8")));
    SecureCharSequence decoded = Bip38.decrypt("6PgGWtx25kUg8QWvwuJAgorN6k9FbE25rv5dMRwu5SKMnfpfVe5mar2ngH", passphrase);
    assertEquals(decoded.toString(), "5KMKKuUmAkiNbA3DazMQiLfDq47qs8MAEThm4yL8R2PhV1ov33D");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:9,代碼來源:Bip38Test.java

示例3: testDecryptNoCompressionWithEcMultiplyWithLot2WithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyWithLot2WithBom() throws InterruptedException, UnsupportedEncodingException, AddressFormatException {
    // "MOLON LABE" using greek characters  = "ΜΟΛΩΝ ΛΑΒΕ"
    String passphrase = "\u039C\u039F\u039B\u03A9\u039D \u039B\u0391\u0392\u0395";
    assertEquals("ce9cce9fce9bcea9ce9d20ce9bce91ce92ce95".toUpperCase(), Utils.bytesToHexString(passphrase.getBytes("UTF-8")));
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PgGWtx25kUg8QWvwuJAgorN6k9FbE25rv5dMRwu5SKMnfpfVe5mar2ngH", passphrase);
    assertEquals(decoded.toString(), "5KMKKuUmAkiNbA3DazMQiLfDq47qs8MAEThm4yL8R2PhV1ov33D");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:9,代碼來源:Bip38Test.java

示例4: testDecryptNoCompression

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompression() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg",
            "TestingOneTwoThree");
    assertEquals(decoded.toString(), "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:7,代碼來源:Bip38Test.java

示例5: testDecryptNoCompressionWithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithBom() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PRVWUbkzzsbcVac2qwfssoUJAN1Xhrg6bNk8J7Nzm5H7kxEbn2Nh2ZoGg",
            "TestingOneTwoThree");
    assertEquals(decoded.toString(), "5KN7MzqK5wt2TP1fQCYyHBtDrXdJuXbUzm4A9rKAteGu3Qi5CVR");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:7,代碼來源:Bip38Test.java

示例6: testDecryptCompression1

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptCompression1() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo",
            "TestingOneTwoThree");
    assertEquals(decoded.toString(), "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:7,代碼來源:Bip38Test.java

示例7: testDecryptCompression1WithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptCompression1WithBom() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PYNKZ1EAgYgmQfmNVamxyXVWHzK5s6DGhwP4J5o44cvXdoY7sRzhtpUeo",
            "TestingOneTwoThree");
    assertEquals(decoded.toString(), "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:7,代碼來源:Bip38Test.java

示例8: testDecryptCompression2

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptCompression2() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7", "Satoshi");
    assertEquals(decoded.toString(), "KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:6,代碼來源:Bip38Test.java

示例9: testDecryptCompression2WithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptCompression2WithBom() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PYLtMnXvfG3oJde97zRyLYFZCYizPU5T3LwgdYJz1fRhh16bU7u6PPmY7", "Satoshi");
    assertEquals(decoded.toString(), "KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:6,代碼來源:Bip38Test.java

示例10: testDecryptNoCompressionWithEcMultiplyNoLot1

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyNoLot1() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("6PfQu77ygVyJLZjfvMLyhLMQbYnu5uguoJJ4kMCLqWwPEdfpwANVS76gTX",
            "TestingOneTwoThree");
    assertEquals(decoded.toString(), "5K4caxezwjGCGfnoPTZ8tMcJBLB7Jvyjv4xxeacadhq8nLisLR2");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:7,代碼來源:Bip38Test.java

示例11: testDecryptNoCompressionWithEcMultiplyNoLot1WithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyNoLot1WithBom() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PfQu77ygVyJLZjfvMLyhLMQbYnu5uguoJJ4kMCLqWwPEdfpwANVS76gTX",
            "TestingOneTwoThree");
    assertEquals(decoded.toString(), "5K4caxezwjGCGfnoPTZ8tMcJBLB7Jvyjv4xxeacadhq8nLisLR2");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:7,代碼來源:Bip38Test.java

示例12: testDecryptNoCompressionWithEcMultiplyNoLot2

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyNoLot2() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("6PfLGnQs6VZnrNpmVKfjotbnQuaJK4KZoPFrAjx1JMJUa1Ft8gnf5WxfKd", "Satoshi");
    assertEquals(decoded.toString(), "5KJ51SgxWaAYR13zd9ReMhJpwrcX47xTJh2D3fGPG9CM8vkv5sH");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:6,代碼來源:Bip38Test.java

示例13: testDecryptNoCompressionWithEcMultiplyNoLot2WithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyNoLot2WithBom() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PfLGnQs6VZnrNpmVKfjotbnQuaJK4KZoPFrAjx1JMJUa1Ft8gnf5WxfKd", "Satoshi");
    assertEquals(decoded.toString(), "5KJ51SgxWaAYR13zd9ReMhJpwrcX47xTJh2D3fGPG9CM8vkv5sH");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:6,代碼來源:Bip38Test.java

示例14: testDecryptNoCompressionWithEcMultiplyWithLot1

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyWithLot1() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("6PgNBNNzDkKdhkT6uJntUXwwzQV8Rr2tZcbkDcuC9DZRsS6AtHts4Ypo1j", "MOLON LABE");
    assertEquals(decoded.toString(), "5JLdxTtcTHcfYcmJsNVy1v2PMDx432JPoYcBTVVRHpPaxUrdtf8");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:6,代碼來源:Bip38Test.java

示例15: testDecryptNoCompressionWithEcMultiplyWithLot1WithBom

import net.bither.bitherj.crypto.bip38.Bip38; //導入方法依賴的package包/類
@Test
public void testDecryptNoCompressionWithEcMultiplyWithLot1WithBom() throws InterruptedException, AddressFormatException {
    SecureCharSequence decoded = Bip38.decrypt("\uFEFF6PgNBNNzDkKdhkT6uJntUXwwzQV8Rr2tZcbkDcuC9DZRsS6AtHts4Ypo1j", "MOLON LABE");
    assertEquals(decoded.toString(), "5JLdxTtcTHcfYcmJsNVy1v2PMDx432JPoYcBTVVRHpPaxUrdtf8");
}
 
開發者ID:bither,項目名稱:bitherj,代碼行數:6,代碼來源:Bip38Test.java


注:本文中的net.bither.bitherj.crypto.bip38.Bip38.decrypt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。