当前位置: 首页>>代码示例>>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;未经允许,请勿转载。