public class DummyKeyManager extends java.lang.Object implements SymmetricKeyManager, AsymmetricKeyManager, RecipientKeyManager
Constructor and Description |
---|
DummyKeyManager() |
Modifier and Type | Method and Description |
---|---|
java.security.PrivateKey |
getPrivateKey(Context context)
Returns the private key that should be used for asymmetric operations for the given context.
|
java.lang.String |
getProvider(Context context)
Method to return the Security Provider to use in given context.
|
java.security.PublicKey |
getPublicKey(Context context)
Returns the public key that should be used for asymmetric operations for the given context.
|
java.util.Map<java.lang.String,java.security.PublicKey> |
getReceipients(Context context)
Own keys are trusted in dummy setup.
|
java.security.Key |
getSymmetricKey(Context context)
Returns the key that should be used for symmetric operations for the given context.
|
java.util.Map<java.lang.String,java.security.PublicKey> |
getTrustedKeys(Context context)
Own keys are trusted in dummy setup.
|
public java.security.Key getSymmetricKey(Context context) throws java.lang.UnsupportedOperationException
getSymmetricKey
in interface SymmetricKeyManager
context
- related context.java.lang.UnsupportedOperationException
- if operation in combination with given context isn't
supported.public java.security.PublicKey getPublicKey(Context context) throws java.lang.UnsupportedOperationException
getPublicKey
in interface AsymmetricKeyManager
context
- related context.java.lang.UnsupportedOperationException
- if operation in combination with given context isn't
supported.public java.security.PrivateKey getPrivateKey(Context context) throws java.lang.UnsupportedOperationException
getPrivateKey
in interface AsymmetricKeyManager
context
- related context.java.lang.UnsupportedOperationException
- if operation in combination with given context isn't
supported.public java.util.Map<java.lang.String,java.security.PublicKey> getTrustedKeys(Context context) throws java.lang.UnsupportedOperationException, InternalErrorException
getTrustedKeys
in interface AsymmetricKeyManager
context
- related context.java.lang.UnsupportedOperationException
- if operation in combination with given context isn't
supported.InternalErrorException
- if internal error occurred retrieving the public keys.public java.util.Map<java.lang.String,java.security.PublicKey> getReceipients(Context context) throws java.lang.UnsupportedOperationException, InternalErrorException
getReceipients
in interface RecipientKeyManager
context
- related context.java.lang.UnsupportedOperationException
- if operation in combination with given context isn't
supported.InternalErrorException
- if internal error occurred retrieving the public keys.public java.lang.String getProvider(Context context)
KeyManager
getProvider
in interface KeyManager
context
- the related context