public interface CryptoEngine
Modifier and Type | Method and Description |
---|---|
io.token.security.Signer |
createSigner(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Signs the data with the identified by the supplied key id.
|
io.token.security.Verifier |
createVerifier(java.lang.String keyId)
Verifies the payload signature.
|
void |
deleteKeys()
Deletes all the keys of this CryptoEngine.
|
io.token.proto.common.security.SecurityProtos.Key |
generateKey(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
Generates keys of the specified level.
|
io.token.proto.common.security.SecurityProtos.Key |
generateKey(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel,
long expiresAtMs)
Generates a key of the specified level with the provided expiration date.
|
java.util.List<io.token.proto.common.security.SecurityProtos.Key> |
getPublicKeys()
Returns public keys that the CryptoEngine can use to sign.
|
io.token.proto.common.security.SecurityProtos.Key generateKey(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
keyLevel
- key privilege levelio.token.proto.common.security.SecurityProtos.Key generateKey(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel, long expiresAtMs)
keyLevel
- key privilege levelexpiresAtMs
- expiration date in millisecondsio.token.security.Signer createSigner(io.token.proto.common.security.SecurityProtos.Key.Level keyLevel)
keyLevel
- level of the key to useio.token.security.Verifier createVerifier(java.lang.String keyId)
keyId
- key idjava.util.List<io.token.proto.common.security.SecurityProtos.Key> getPublicKeys()
void deleteKeys()