bcquality/microsoft/knowledge/security/isolatedstorage-access-must-be-local-or-internal.good.al
Jesper Schulz-Wedde ec8f891954 Correct security and privacy guidance
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 9c2eebc4-dcd5-4b85-8113-90772d818900
2026-07-14 10:45:42 +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;
}