bcquality/microsoft/knowledge/security/isolatedstorage-access-must-be-local-or-internal.good.al
Jesper Schulz-Wedde aca3986fd0
Correct security and privacy knowledge guidance (#92)
* Correct security and privacy guidance

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9c2eebc4-dcd5-4b85-8113-90772d818900

* Address security privacy review findings

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9c2eebc4-dcd5-4b85-8113-90772d818900

---------

Co-authored-by: Jesper Schulz-Wedde <jesper.schulzwedde@microsoft.com>
2026-07-14 11:25:03 +02:00

15 lines
463 B
AL

codeunit 50215 "Sec Sample IsoStorage Good"
{
local procedure GetApiKey(var ApiKey: SecretText): Boolean
begin
if not IsolatedStorage.Contains('ApiKey', DataScope::Module) then
exit(false);
IsolatedStorage.Get('ApiKey', DataScope::Module, ApiKey);
exit(true);
end;
internal procedure SetApiKey(NewKey: SecretText)
begin
IsolatedStorage.SetEncrypted('ApiKey', NewKey, DataScope::Module);
end;
}