Package org.xrpl.xrpl4j.crypto
Class BcKeyUtils
java.lang.Object
org.xrpl.xrpl4j.crypto.BcKeyUtils
Utility class for converting between XRPL-4j public/private keys and BouncyCastle implementations.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bouncycastle.crypto.params.ECPrivateKeyParameters
toEc25519PrivateKeyParams
(PrivateKey privateKey) Convert from aPrivateKey
to aECPrivateKeyParameters
.static org.bouncycastle.crypto.params.ECPublicKeyParameters
toEcPublicKeyParameters
(PublicKey publicKey) Convert from aPublicKey
to aECPublicKeyParameters
.static org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters
toEd25519PrivateKeyParams
(PrivateKey privateKey) Convert from aPrivateKey
to aEd25519PrivateKeyParameters
.static org.bouncycastle.crypto.params.Ed25519PublicKeyParameters
toEd25519PublicKeyParameters
(PublicKey publicKey) Convert from aPublicKey
to aEd25519PublicKeyParameters
.static PrivateKey
toPrivateKey
(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParameters
to aPrivateKey
.static PrivateKey
toPrivateKey
(org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters ed25519PrivateKeyParameters) Convert from aEd25519PrivateKeyParameters
to aPrivateKey
.static org.bouncycastle.crypto.params.ECPublicKeyParameters
toPublicKey
(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParameters
to aPublicKey
.static PublicKey
toPublicKey
(org.bouncycastle.crypto.params.ECPublicKeyParameters ecPublicKeyParameters) Convert from aECPublicKeyParameters
to aPublicKey
.static PublicKey
toPublicKey
(org.bouncycastle.crypto.params.Ed25519PublicKeyParameters ed25519PublicKeyParameters) Convert from aEd25519PublicKeyParameters
to aPublicKey
.static PublicKey
toPublicKey
(PrivateKey privateKey) Convert from aPrivateKey
to aPublicKey
.
-
Method Details
-
toPrivateKey
public static PrivateKey toPrivateKey(org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters ed25519PrivateKeyParameters) Convert from aEd25519PrivateKeyParameters
to aPrivateKey
.- Parameters:
ed25519PrivateKeyParameters
- AEd25519PrivateKeyParameters
.- Returns:
- A
PrivateKey
.
-
toPrivateKey
public static PrivateKey toPrivateKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParameters
to aPrivateKey
.- Parameters:
ecPrivateKeyParameters
- AECPrivateKeyParameters
.- Returns:
- A
PrivateKey
.
-
toEd25519PublicKeyParameters
public static org.bouncycastle.crypto.params.Ed25519PublicKeyParameters toEd25519PublicKeyParameters(PublicKey publicKey) Convert from aPublicKey
to aEd25519PublicKeyParameters
.- Parameters:
publicKey
- APublicKey
with- Returns:
- A
Ed25519PublicKeyParameters
.
-
toPublicKey
public static PublicKey toPublicKey(org.bouncycastle.crypto.params.Ed25519PublicKeyParameters ed25519PublicKeyParameters) Convert from aEd25519PublicKeyParameters
to aPublicKey
.- Parameters:
ed25519PublicKeyParameters
- AEd25519PublicKeyParameters
.- Returns:
- A
PublicKey
.
-
toPublicKey
public static PublicKey toPublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters ecPublicKeyParameters) Convert from aECPublicKeyParameters
to aPublicKey
.- Parameters:
ecPublicKeyParameters
- AECPublicKeyParameters
.- Returns:
- A
PublicKey
.
-
toPublicKey
public static org.bouncycastle.crypto.params.ECPublicKeyParameters toPublicKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParameters
to aPublicKey
.- Parameters:
ecPrivateKeyParameters
- AECPrivateKeyParameters
.- Returns:
- A
PublicKey
.
-
toPublicKey
Convert from aPrivateKey
to aPublicKey
.- Parameters:
privateKey
- APrivateKey
.- Returns:
- A
PublicKey
.
-
toEd25519PrivateKeyParams
public static org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters toEd25519PrivateKeyParams(PrivateKey privateKey) Convert from aPrivateKey
to aEd25519PrivateKeyParameters
.- Parameters:
privateKey
- APrivateKey
.- Returns:
- A
Ed25519PrivateKeyParameters
.
-
toEcPublicKeyParameters
public static org.bouncycastle.crypto.params.ECPublicKeyParameters toEcPublicKeyParameters(PublicKey publicKey) Convert from aPublicKey
to aECPublicKeyParameters
.- Parameters:
publicKey
- APublicKey
with- Returns:
- A
ECPublicKeyParameters
.
-
toEc25519PrivateKeyParams
public static org.bouncycastle.crypto.params.ECPrivateKeyParameters toEc25519PrivateKeyParams(PrivateKey privateKey) Convert from aPrivateKey
to aECPrivateKeyParameters
.- Parameters:
privateKey
- APrivateKey
.- Returns:
- A
ECPrivateKeyParameters
.
-