public class KeyStoreManagerDelegate extends KeyStoreManager
KeyStoreManager.CertUsage, KeyStoreManager.KeyAlgorithm, KeyStoreManager.KeySize
ANON_COMMON_NAME, ANON_EXPIRATION_YEARS, ANON_IDENTITY_ALIAS
Modifier and Type | Method and Description |
---|---|
void |
createSelfSignedCertEntry(KeyStore ignore1,
String alias,
char[] ignore2,
boolean isServer,
Map<String,String> attributes,
Date expiration) |
byte[] |
decrypt(C4KeyPair keyPair,
byte[] data)
Decrypts data using the private key.
|
int |
deleteEntries(KeyStore ignore,
Fn.Predicate<String> filter) |
boolean |
findAlias(KeyStore ignore,
String targetAlias) |
void |
free(C4KeyPair keyPair)
Called when the C4KeyPair is released and the externalKey is no longer needed
and when associated resources may be freed
|
List<Certificate> |
getCertificateChain(KeyStore ignore,
String alias) |
PrivateKey |
getKey(KeyStore ignore1,
String alias,
char[] ignore2) |
byte[] |
getKeyData(C4KeyPair keyPair)
Provides the _public_ key's raw data, as an ASN.1 DER sequence of [modulus, exponent].
|
byte[] |
sign(C4KeyPair keyPair,
Signature.SignatureDigestAlgorithm digestAlgorithm,
byte[] data)
Uses the private key to generate a signature of input data.
|
checkAlias, getInstance, setInstance
@Nullable public byte[] getKeyData(@NonNull C4KeyPair keyPair)
KeyStoreManager
getKeyData
in class KeyStoreManager
keyPair
- The key pair@Nullable public byte[] sign(@NonNull C4KeyPair keyPair, @NonNull Signature.SignatureDigestAlgorithm digestAlgorithm, @NonNull byte[] data)
KeyStoreManager
sign
in class KeyStoreManager
keyPair
- The key pairdigestAlgorithm
- Indicates what type of digest to create the signature from.data
- The data to be signed.@Nullable public byte[] decrypt(@NonNull C4KeyPair keyPair, @NonNull byte[] data)
KeyStoreManager
decrypt
in class KeyStoreManager
keyPair
- The key pairdata
- The data to be encrypted.public void free(@NonNull C4KeyPair keyPair)
KeyStoreManager
free
in class KeyStoreManager
keyPair
- The key pairpublic boolean findAlias(@Nullable KeyStore ignore, @NonNull String targetAlias)
findAlias
in class KeyStoreManager
@Nullable public PrivateKey getKey(@Nullable KeyStore ignore1, @NonNull String alias, @Nullable char[] ignore2)
getKey
in class KeyStoreManager
@Nullable public List<Certificate> getCertificateChain(@Nullable KeyStore ignore, @NonNull String alias)
getCertificateChain
in class KeyStoreManager
public void createSelfSignedCertEntry(@Nullable KeyStore ignore1, @NonNull String alias, @Nullable char[] ignore2, boolean isServer, @NonNull Map<String,String> attributes, @Nullable Date expiration) throws CouchbaseLiteException
createSelfSignedCertEntry
in class KeyStoreManager
CouchbaseLiteException
public int deleteEntries(@Nullable KeyStore ignore, @NonNull Fn.Predicate<String> filter) throws CouchbaseLiteException
deleteEntries
in class KeyStoreManager
CouchbaseLiteException