Package io.token.security.keystore
Class TrustedKey
- java.lang.Object
-
- io.token.security.keystore.TrustedKey
-
public abstract class TrustedKey extends java.lang.Object
A key trusted byInMemoryTrustedKeyStore
.
-
-
Constructor Summary
Constructors Constructor Description TrustedKey()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TrustedKey
create(CryptoType cryptoType, java.security.PublicKey publicKey)
Creates new trusted key instance.abstract CryptoType
cryptoType()
Crypto type, the algorithm used for signing and verification.java.lang.String
id()
Key id.abstract java.security.PublicKey
publicKey()
Returns public key.java.lang.String
publicKeyString()
Returns public key in a string format (encoded).
-
-
-
Method Detail
-
create
public static TrustedKey create(CryptoType cryptoType, java.security.PublicKey publicKey)
Creates new trusted key instance.- Parameters:
cryptoType
- crypto to usepublicKey
- public key to use- Returns:
- newly created trusted key
-
id
public java.lang.String id()
Key id.- Returns:
- key id
-
publicKeyString
public java.lang.String publicKeyString()
Returns public key in a string format (encoded).- Returns:
- public key string
-
cryptoType
public abstract CryptoType cryptoType()
Crypto type, the algorithm used for signing and verification.- Returns:
- crypto type
-
publicKey
public abstract java.security.PublicKey publicKey()
Returns public key.- Returns:
- public key
-
-