File tree Expand file tree Collapse file tree 6 files changed +12
-12
lines changed
bindings/netstandard/ElectionGuard/ElectionGuard.Encryption Expand file tree Collapse file tree 6 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -909,7 +909,7 @@ public unsafe string ToJson()
909909 var status = NativeInterface . PlaintextBallot . ToJson (
910910 Handle , out IntPtr pointer , out ulong size ) ;
911911 status . ThrowIfError ( ) ;
912- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
912+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
913913 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
914914 return json ;
915915 }
@@ -1242,7 +1242,7 @@ public unsafe string ToJson(bool withNonces = false)
12421242 : NativeInterface . CiphertextBallot . ToJson (
12431243 Handle , out pointer , out size ) ;
12441244 status . ThrowIfError ( ) ;
1245- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
1245+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
12461246 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
12471247 return json ;
12481248 }
@@ -1609,7 +1609,7 @@ public unsafe string ToJson()
16091609 var status = NativeInterface . SubmittedBallot . ToJson (
16101610 Handle , out IntPtr pointer , out ulong size ) ;
16111611 status . ThrowIfError ( ) ;
1612- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
1612+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
16131613 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
16141614 return json ;
16151615 }
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ public unsafe string ToJson()
316316 var status = NativeInterface . CiphertextElectionContext . ToJson (
317317 Handle , out IntPtr pointer , out ulong size ) ;
318318 status . ThrowIfError ( ) ;
319- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
319+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
320320 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
321321 return json ;
322322 }
Original file line number Diff line number Diff line change 77 <!-- Project -->
88 <RootNamespace >ElectionGuard</RootNamespace >
99 <AssemblyName >ElectionGuard.Encryption</AssemblyName >
10- <Version >0.1.17 </Version >
11- <AssemblyVersion >0.1.17 .0</AssemblyVersion >
12- <AssemblyFileVersion >0.1.17 .0</AssemblyFileVersion >
10+ <Version >0.1.18 </Version >
11+ <AssemblyVersion >0.1.18 .0</AssemblyVersion >
12+ <AssemblyFileVersion >0.1.18 .0</AssemblyFileVersion >
1313 </PropertyGroup >
1414
1515 <PropertyGroup >
1919 <Title >ElectionGuard Encryption</Title >
2020 <Description >Open source implementation of ElectionGuard's ballot encryption.</Description >
2121 <Authors >Microsoft</Authors >
22- <PackageVersion >0.1.17 </PackageVersion >
22+ <PackageVersion >0.1.18 </PackageVersion >
2323 <PackageLicenseExpression >MIT</PackageLicenseExpression >
2424 <PackageProjectUrl >https://github.com/microsoft/electionguard-cpp</PackageProjectUrl >
2525 <RepositoryUrl >https://github.com/microsoft/electionguard-cpp</RepositoryUrl >
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public unsafe string ToJson()
6868 {
6969 var status = NativeInterface . EncryptionDevice . ToJson ( Handle , out IntPtr pointer , out ulong size ) ;
7070 status . ThrowIfError ( ) ;
71- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
71+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
7272 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
7373 return json ;
7474 }
Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ public unsafe static string ToJson()
415415 var status = NativeInterface . Constants . ToJson (
416416 out IntPtr pointer , out ulong size ) ;
417417 status . ThrowIfError ( ) ;
418- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
418+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
419419 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
420420 return json ;
421421 }
Original file line number Diff line number Diff line change @@ -2454,7 +2454,7 @@ public unsafe string ToJson()
24542454 {
24552455 throw new ElectionGuardException ( $ "ToJson Error Status: { status } ") ;
24562456 }
2457- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
2457+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
24582458 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
24592459 return json ;
24602460 }
@@ -2681,7 +2681,7 @@ public unsafe string ToJson()
26812681 {
26822682 throw new ElectionGuardException ( $ "ToJson Error Status: { status } ") ;
26832683 }
2684- var json = Marshal . PtrToStringAnsi ( pointer , ( int ) size ) ;
2684+ var json = Marshal . PtrToStringAnsi ( pointer ) ;
26852685 NativeInterface . Memory . FreeIntPtr ( pointer ) ;
26862686 return json ;
26872687 }
You can’t perform that action at this time.
0 commit comments