public class C4KeyPair extends C4NativePeer
| Modifier and Type | Class and Description |
|---|---|
static interface |
C4KeyPair.NativeImpl |
@NonNull public static C4KeyPair createKeyPair(@Nullable KeyStore keyStore, @NonNull String keyAlias, @Nullable char[] keyPassword, @NonNull KeyStoreManager.KeyAlgorithm algorithm, @NonNull KeyStoreManager.KeySize keySize) throws CouchbaseLiteException
keyStore - the KeyStore object containing the cert and key pairkeyAlias - the alias by which the key is known to the keystorekeyPassword - the password protecting the keyalgorithm - key algorithm (must be KeyManager.KeyAlgorithm.RSA)keySize - key sizeCouchbaseLiteException - on error@NonNull public static C4KeyPair createKeyPair(@Nullable KeyStore keyStore, @NonNull String keyAlias, @Nullable char[] keyPassword, @NonNull KeyStoreManager.KeyAlgorithm algorithm, @NonNull KeyStoreManager.KeySize keySize, @Nullable KeyPair keys) throws CouchbaseLiteException
keyStore - the KeyStore object containing the cert and key pairkeyAlias - the alias by which the key is known to the keystorekeyPassword - the password protecting the keyalgorithm - key algorithm (must be KeyManager.KeyAlgorithm.RSA)keySize - key sizekeys - keyPair for the case that the KeyPair hasn't been saved into the KeyStoreCouchbaseLiteException - on error@NonNull public static C4KeyPair createKeyPair(@NonNull String keyAlias, @NonNull KeyStoreManager.KeyAlgorithm algorithm, @NonNull KeyStoreManager.KeySize keySize) throws CouchbaseLiteException
keyAlias - the alias by which the key is known to the keystorealgorithm - key algorithm (must be KeyManager.KeyAlgorithm.RSA)keySize - key sizeCouchbaseLiteException - on error@Nullable public KeyStore getKeyStore()
@NonNull public String getKeyAlias()
@Nullable public char[] getKeyPassword()
@Nullable public KeyPair getKeys()
@NonNull
public byte[] generateSelfSignedCertificate(@NonNull
KeyStoreManager.KeyAlgorithm algorithm,
@NonNull
KeyStoreManager.KeySize keySize,
@NonNull
Map<String,String> attributes,
@NonNull
KeyStoreManager.CertUsage usage,
long expSecond)
throws CouchbaseLiteException
CouchbaseLiteException@CallSuper public void close()
@NonNull public String toString()
toString in class C4NativePeer