Skip to content

Commit b9f1069

Browse files
authored
add docs on setSecretKey, Fixes AB#3525780 (#2906)
1 parent 83b6326 commit b9f1069

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

common/src/main/java/com/microsoft/identity/common/adal/internal/AuthenticationSettings.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,13 @@ public Map<String, byte[]> getBrokerSecretKeys() {
116116
/**
117117
* Set raw bytes to derive secretKey to use in encrypt/decrypt. KeySpec
118118
* algorithm is AES.
119-
* <p>
119+
*
120+
* If the calling app needs to set the key,
121+
* this method must be invoked before any other MSAL classes,
122+
* otherwise the key might not be loaded
123+
* (The existing encrypted key will not be readable,
124+
* and new data will be encrypted with a Keystore-wrapped key).
125+
*
120126
* Please note: If a device with an existing installation of the ADAL/MSAL host-app is upgraded
121127
* from API 17 -> API 18+ then the previously-used secret key data must continue to be supplied
122128
* in order to not lose SSO state when reading cache entries written prior to upgrade.

0 commit comments

Comments
 (0)