Package org.xrpl.xrpl4j.crypto.keys.bc
Class BcKeyUtils
java.lang.Object
org.xrpl.xrpl4j.crypto.keys.bc.BcKeyUtils
Utility class for converting between XRPL-4j public/private keys and BouncyCastle implementations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.bouncycastle.crypto.params.ECDomainParameters -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bouncycastle.crypto.params.ECPrivateKeyParameterstoEcPrivateKeyParams(PrivateKey privateKey) Convert from aPrivateKeyto aECPrivateKeyParameters.static org.bouncycastle.crypto.params.ECPublicKeyParameterstoEcPublicKeyParameters(PublicKey publicKey) Convert from aPublicKeyto aECPublicKeyParameters.static org.bouncycastle.crypto.params.Ed25519PrivateKeyParameterstoEd25519PrivateKeyParams(PrivateKey privateKey) Convert from aPrivateKeyto aEd25519PrivateKeyParameters.static org.bouncycastle.crypto.params.Ed25519PublicKeyParameterstoEd25519PublicKeyParameters(PublicKey publicKey) Convert from aPublicKeyto aEd25519PublicKeyParameters.static PrivateKeytoPrivateKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParametersto aPrivateKey.static PrivateKeytoPrivateKey(org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters ed25519PrivateKeyParameters) Convert from aEd25519PrivateKeyParametersto aPrivateKey.static org.bouncycastle.crypto.params.ECPublicKeyParameterstoPublicKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParametersto aPublicKey.static PublicKeytoPublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters ecPublicKeyParameters) Convert from aECPublicKeyParametersto aPublicKey.static PublicKeytoPublicKey(org.bouncycastle.crypto.params.Ed25519PublicKeyParameters ed25519PublicKeyParameters) Convert from aEd25519PublicKeyParametersto aPublicKey.static PublicKeytoPublicKey(PrivateKey privateKey) Convert from aPrivateKeyto aPublicKey.
-
Field Details
-
PARAMS
public static final org.bouncycastle.crypto.params.ECDomainParameters PARAMS
-
-
Method Details
-
toPrivateKey
public static PrivateKey toPrivateKey(org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters ed25519PrivateKeyParameters) Convert from aEd25519PrivateKeyParametersto aPrivateKey.- Parameters:
ed25519PrivateKeyParameters- AEd25519PrivateKeyParameters.- Returns:
- A
PrivateKey.
-
toPrivateKey
public static PrivateKey toPrivateKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParametersto aPrivateKey.- Parameters:
ecPrivateKeyParameters- AECPrivateKeyParameters.- Returns:
- A
PrivateKey.
-
toEd25519PublicKeyParameters
public static org.bouncycastle.crypto.params.Ed25519PublicKeyParameters toEd25519PublicKeyParameters(PublicKey publicKey) Convert from aPublicKeyto aEd25519PublicKeyParameters.- Parameters:
publicKey- APublicKeywith- Returns:
- A
Ed25519PublicKeyParameters.
-
toPublicKey
public static PublicKey toPublicKey(org.bouncycastle.crypto.params.Ed25519PublicKeyParameters ed25519PublicKeyParameters) Convert from aEd25519PublicKeyParametersto aPublicKey.- Parameters:
ed25519PublicKeyParameters- AEd25519PublicKeyParameters.- Returns:
- A
PublicKey.
-
toPublicKey
public static PublicKey toPublicKey(org.bouncycastle.crypto.params.ECPublicKeyParameters ecPublicKeyParameters) Convert from aECPublicKeyParametersto aPublicKey.- Parameters:
ecPublicKeyParameters- AECPublicKeyParameters.- Returns:
- A
PublicKey.
-
toPublicKey
public static org.bouncycastle.crypto.params.ECPublicKeyParameters toPublicKey(org.bouncycastle.crypto.params.ECPrivateKeyParameters ecPrivateKeyParameters) Convert from aECPrivateKeyParametersto aPublicKey.- Parameters:
ecPrivateKeyParameters- AECPrivateKeyParameters.- Returns:
- A
PublicKey.
-
toPublicKey
Convert from aPrivateKeyto aPublicKey.- Parameters:
privateKey- APrivateKey.- Returns:
- A
PublicKey.
-
toEd25519PrivateKeyParams
public static org.bouncycastle.crypto.params.Ed25519PrivateKeyParameters toEd25519PrivateKeyParams(PrivateKey privateKey) Convert from aPrivateKeyto aEd25519PrivateKeyParameters.- Parameters:
privateKey- APrivateKey.- Returns:
- A
Ed25519PrivateKeyParameters.
-
toEcPublicKeyParameters
public static org.bouncycastle.crypto.params.ECPublicKeyParameters toEcPublicKeyParameters(PublicKey publicKey) Convert from aPublicKeyto aECPublicKeyParameters.- Parameters:
publicKey- APublicKeywith- Returns:
- A
ECPublicKeyParameters.
-
toEcPrivateKeyParams
public static org.bouncycastle.crypto.params.ECPrivateKeyParameters toEcPrivateKeyParams(PrivateKey privateKey) Convert from aPrivateKeyto aECPrivateKeyParameters.- Parameters:
privateKey- APrivateKey.- Returns:
- A
ECPrivateKeyParameters.
-