Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -670,15 +670,15 @@ private synchronized void resetKeyPairFromAndroidKeyStore() throws KeyStoreExcep
@SuppressLint("GetInstance")
private byte[] wrap(final SecretKey key) throws GeneralSecurityException {
Logger.v(TAG, "Wrap secret key.");
final Cipher wrapCipher = Cipher.getInstance(WRAP_ALGORITHM);
final Cipher wrapCipher = Cipher.getInstance(WRAP_ALGORITHM); // CodeQL [SM05136] ADAL is deprecated, no more updates will be made.
wrapCipher.init(Cipher.WRAP_MODE, mKeyPair.getPublic());
return wrapCipher.wrap(key);
}

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@SuppressLint("GetInstance")
private SecretKey unwrap(final byte[] keyBlob) throws GeneralSecurityException {
final Cipher wrapCipher = Cipher.getInstance(WRAP_ALGORITHM);
final Cipher wrapCipher = Cipher.getInstance(WRAP_ALGORITHM); // CodeQL [SM05136] ADAL is deprecated, no more updates will be made.
wrapCipher.init(Cipher.UNWRAP_MODE, mKeyPair.getPrivate());
try {
return (SecretKey) wrapCipher.unwrap(keyBlob, KEYSPEC_ALGORITHM, Cipher.SECRET_KEY);
Expand Down
Loading