AWS encryption with Android Studio

0

In trying to implement "encrypting and decrypting strings" under Android Studio, I find that the call to:

KmsMasterKeyProvider keyProvider = KmsMasterKeyProvider.builder().buildStrict(keyArn);

crashes without an exception being thrown. The String keyArn is: "arn:aws:kms:us-west-2:834308876806:key/ce951986-5be9-4255-b60f-xxxxxxxxxxxx" and the library jar was obtained from: https://mvnrepository.com/artifact/com.amazonaws/aws-encryption-sdk-java/2.4.0

Any suggestions would be most welcome! Thanks in advance. Bob

Update: added "aws-java-sdk-kms-1.12.338" from: https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk-kms/1.12.338

using: "import com.amazonaws.encryptionsdk.kmssdkv2.KmsMasterKeyProvider;"

Now has keyProvider but crashes on:

final CryptoResult<byte[], KmsMasterKey> encryptResult = crypto.encryptData(keyProvider, EXAMPLE_DATA, encryptionContext);

Still no exception thrown.

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions