Correct security and privacy guidance

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

Copilot-Session: 9c2eebc4-dcd5-4b85-8113-90772d818900
This commit is contained in:
Jesper Schulz-Wedde 2026-07-14 10:45:42 +02:00
parent 7a678d1aff
commit ec8f891954
34 changed files with 189 additions and 150 deletions

View file

@ -1,10 +1,11 @@
codeunit 50217 "Sec Sample SetEncrypted Good"
{
internal procedure StoreApiKey(ApiKeyValue: Text)
internal procedure StoreApiKey(ApiKeyValue: SecretText)
var
StoreApiKeyFailedErr: Label 'The API key could not be stored.';
begin
if StrLen(ApiKeyValue) > 200 then
Error('API key too long for encrypted storage');
IsolatedStorage.SetEncrypted('ApiKey', ApiKeyValue, DataScope::Module);
if not IsolatedStorage.SetEncrypted('ApiKey', ApiKeyValue, DataScope::Module) then
Error(StoreApiKeyFailedErr);
end;
local procedure ReadApiKey(var ApiKey: SecretText): Boolean