Package com.klaytn.caver.utils
Class AccountKeyPublicUtils
- java.lang.Object
-
- com.klaytn.caver.utils.AccountKeyPublicUtils
-
public class AccountKeyPublicUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static org.bouncycastle.asn1.x9.X9ECParameters
CURVE_PARAMS
-
Constructor Summary
Constructors Constructor Description AccountKeyPublicUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AccountKeyPublic
decompressKey(java.lang.String compressedPublicKey)
Deprecated.static org.bouncycastle.math.ec.ECPoint
getECPoint(java.lang.String key)
Creates ECPoint instance using compressed public keystatic org.bouncycastle.math.ec.ECPoint
getECPoint(java.lang.String x, java.lang.String y)
Creates ECPoint instance using ecc public key x,y coordinatesstatic boolean
isCompressedPublicKey(java.lang.String key)
Check if the given key is in compressed format.static boolean
isUncompressedPublicKey(java.lang.String key)
Check if the given key is in compressed format.static java.lang.String
toCompressedPublicKey(java.math.BigInteger publicKey)
Deprecated.static boolean
validateXYPoint(java.lang.String compressedPubKey)
Check if the X, Y coordinates included in the public key are valid.static boolean
validateXYPoint(java.lang.String x, java.lang.String y)
Check that given X, Y coordinates included in the public key.
-
-
-
Method Detail
-
toCompressedPublicKey
@Deprecated public static java.lang.String toCompressedPublicKey(java.math.BigInteger publicKey)
Deprecated.Convert uncompressed public key to compress format- Parameters:
publicKey
- uncompressed public key biginteger- Returns:
- compressed public key string
-
decompressKey
@Deprecated public static AccountKeyPublic decompressKey(java.lang.String compressedPublicKey)
Deprecated.Creates AccountKeyPublic(caver.tx.account.AccountKeyPublic) instance with converting uncompressed format- Parameters:
compressedPublicKey
- compressed public key- Returns:
- AccountKeyPublic(caver.tx.account.AccountKeyPublic)
-
getECPoint
public static org.bouncycastle.math.ec.ECPoint getECPoint(java.lang.String key)
Creates ECPoint instance using compressed public key- Parameters:
key
- public key- Returns:
- ECPoint
-
getECPoint
public static org.bouncycastle.math.ec.ECPoint getECPoint(java.lang.String x, java.lang.String y)
Creates ECPoint instance using ecc public key x,y coordinates- Parameters:
x
- x pointy
- y point- Returns:
- ECPoint
-
validateXYPoint
public static boolean validateXYPoint(java.lang.String compressedPubKey)
Check if the X, Y coordinates included in the public key are valid.- Parameters:
compressedPubKey
- compressed public key- Returns:
- valid or not
-
validateXYPoint
public static boolean validateXYPoint(java.lang.String x, java.lang.String y)
Check that given X, Y coordinates included in the public key.- Parameters:
x
- x pointy
- y point- Returns:
- valid or not
-
isCompressedPublicKey
public static boolean isCompressedPublicKey(java.lang.String key)
Check if the given key is in compressed format.- Parameters:
key
- public key- Returns:
- valid or not
-
isUncompressedPublicKey
public static boolean isUncompressedPublicKey(java.lang.String key)
Check if the given key is in compressed format.- Parameters:
key
- public key- Returns:
- valid or not
-
-