Package io.token.bank.security
Class KeyUtil
- java.lang.Object
-
- io.token.bank.security.KeyUtil
-
public class KeyUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description KeyUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.token.security.SecretKey
toSecretKey(java.lang.String privateKey, java.lang.String publicKey, java.lang.String type)
Converts plain text keys to aSecretKey
.static io.token.security.keystore.SecretKeyPair
toSecretKeyPair(java.lang.String privateKey, java.lang.String publicKey, java.lang.String type)
Converts plain text keys to aSecretKeyPair
.static io.token.security.keystore.TrustedKey
toTrustedKey(java.lang.String publicKey, java.lang.String type)
Converts plain text keys to aTrustedKey
.
-
-
-
Method Detail
-
toSecretKey
public static io.token.security.SecretKey toSecretKey(java.lang.String privateKey, java.lang.String publicKey, java.lang.String type)
Converts plain text keys to aSecretKey
.- Parameters:
privateKey
- the private keypublicKey
- the public keytype
- the type- Returns:
- the secret key
-
toSecretKeyPair
public static io.token.security.keystore.SecretKeyPair toSecretKeyPair(java.lang.String privateKey, java.lang.String publicKey, java.lang.String type)
Converts plain text keys to aSecretKeyPair
.- Parameters:
privateKey
- the private keypublicKey
- the public keytype
- the type- Returns:
- the secret key pair
-
toTrustedKey
public static io.token.security.keystore.TrustedKey toTrustedKey(java.lang.String publicKey, java.lang.String type)
Converts plain text keys to aTrustedKey
.- Parameters:
publicKey
- the public keytype
- the type- Returns:
- the trusted key
-
-