Wif2PrivKey: Create private key from WIF

Description Usage Arguments Value Author(s) References See Also Examples

Description

Returns the corresponding private key from a WIF key.

Usage

1

Arguments

wif

character, a WIF key.

Value

character, the corresponding private key.

Author(s)

Bernhard Pfaff

References

https://en.bitcoin.it/wiki/Wallet_import_format,
https://en.bitcoin.it/wiki/Address

See Also

Other BtcAdresses: BTCADR-class, PrivKey2PubKey, PrivKey2Wif, PubHash2BtcAdr, PubKey2PubHash, base58CheckDecode, base58CheckEncode, concatHex, createBtcAdr, createPrivateKey, decodeHex, hash160, hash256, validBtcAdr

Examples

1
2
3
4
5
suppressWarnings(RNGversion("3.5.0"))
pk1 <- createPrivateKey()
wif <- PrivKey2Wif(pk1)
pk2 <- Wif2PrivKey(wif)
identical(pk1, pk2)

Example output

Warning message:
In createPrivateKey() : 
For exemplary purposes, only.
Use at your own risk!

Warning messages:
1: In PrivKey2Wif(pk1) : 
For exemplary purposes, only.
Use at your own risk!

2: In base58CheckEncode(privkeyextcs) :
  out-of-range values treated as 0 in coercion to raw
Warning message:
In Wif2PrivKey(wif) : 
For exemplary purposes, only.
Use at your own risk!

[1] TRUE

rbtc documentation built on May 2, 2019, 6:11 p.m.

Related to Wif2PrivKey in rbtc...