Skip to content

Commit 1e1879a

Browse files
- correção de saida da cripto para string
1 parent a6e887a commit 1e1879a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/utils/RALCripto.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function TRALCripto.Encrypt(AValue: TStream): StringRAL;
118118
vStream := EncryptAsStream(AValue);
119119
vStream.Position := 0;
120120

121-
Result := TRALBase64.Encode(vStream);
121+
Result := StreamToString(vStream);
122122
finally
123123
FreeAndNil(vStream);
124124
end;

src/utils/RALStream.pas

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ function StringToStream(const AStr: StringRAL): TStream;
129129
vBytes : TBytes;
130130
begin
131131
vBytes := StringToBytes(AStr);
132-
133-
Result := TMemoryStream.Create;
134-
Result.Write(vBytes[0], Length(vBytes));
135-
Result.Position := 0;
132+
Result := BytesToStream(vBytes)
136133
end;
137134

138135
function StringToStreamUTF8(const AStr: StringRAL): TStream;

0 commit comments

Comments
 (0)