use of com.intellij.credentialStore.OneTimeString in project intellij-community by JetBrains.
the class BasePasswordSafeProvider method get.
@Nullable
public Credentials get(@NotNull CredentialAttributes attributes) {
byte[] masterKey = key();
byte[] encryptedPassword = getEncryptedPassword(EncryptionUtil.encryptKey(masterKey, EncryptionUtil.rawKey(attributes)));
OneTimeString password = encryptedPassword == null ? null : EncryptionUtil.decryptText(masterKey, encryptedPassword);
return password == null ? null : new Credentials(attributes.getUserName(), password);
}
Aggregations