本文整理汇总了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;
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}