Skip to content

Commit

Permalink
fix code documentation, increase version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Cinorid committed Apr 10, 2021
1 parent bfb73e1 commit b1193d1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
31 changes: 27 additions & 4 deletions PrivateBox/PrivateBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,13 @@ public static byte[] Multibox(string msg, List<byte[]> recipients, int maxRecipi
var _msg = Encoding.UTF8.GetBytes(msg);
return Multibox(_msg, recipients.ToArray(), maxRecipients);
}

/// <summary>
/// Takes a 'plaintext' Buffer of the message you want to encrypt,<para />
/// and an array of recipient public keys.<para />
/// Returns a message that is encrypted to all recipients<para />
/// and openable by them with 'PrivateBox.MultiboxOpen'.<para />
/// The 'recipients' must be between 1 and 7 items long.
/// same as Multibox
/// </summary>
/// <param name="msg"></param>
Expand All @@ -131,6 +136,11 @@ public static byte[] Encrypt(byte[] msg, byte[][] recipients, int maxRecipients
}

/// <summary>
/// Takes a 'plaintext' Buffer of the message you want to encrypt,<para />
/// and an array of recipient public keys.<para />
/// Returns a message that is encrypted to all recipients<para />
/// and openable by them with 'PrivateBox.MultiboxOpen'.<para />
/// The 'recipients' must be between 1 and 7 items long.
/// same as Multibox
/// </summary>
/// <param name="msg"></param>
Expand All @@ -143,6 +153,11 @@ public static byte[] Encrypt(byte[] msg, List<byte[]> recipients, int maxRecipie
}

/// <summary>
/// Takes a 'plaintext' Buffer of the message you want to encrypt and encode it to UTF8 bytes array,<para />
/// and an array of recipient public keys.<para />
/// Returns a message that is encrypted to all recipients<para />
/// and openable by them with 'PrivateBox.MultiboxOpen'.<para />
/// The 'recipients' must be between 1 and 7 items long.
/// same as Multibox
/// </summary>
/// <param name="msg"></param>
Expand All @@ -155,6 +170,11 @@ public static byte[] Encrypt(string msg, byte[][] recipients, int maxRecipients
}

/// <summary>
/// Takes a 'plaintext' Buffer of the message you want to encrypt and encode it to UTF8 bytes array,<para />
/// and an array of recipient public keys.<para />
/// Returns a message that is encrypted to all recipients<para />
/// and openable by them with 'PrivateBox.MultiboxOpen'.<para />
/// The 'recipients' must be between 1 and 7 items long.
/// same as Multibox
/// </summary>
/// <param name="msg"></param>
Expand All @@ -165,9 +185,9 @@ public static byte[] Encrypt(string msg, List<byte[]> recipients, int maxRecipie
{
return Multibox(msg, recipients, maxRecipients);
}

/// <summary>
///
/// MultiboxOpenKey
/// </summary>
/// <param name="cypherText"></param>
/// <param name="secretKey"></param>
Expand Down Expand Up @@ -208,7 +228,7 @@ public static byte[] MultiboxOpenKey(byte[] cypherText, byte[] secretKey, int ma
}

/// <summary>
///
/// MultiboxOpenBody
/// </summary>
/// <param name="cypherText"></param>
/// <param name="length_and_key"></param>
Expand Down Expand Up @@ -245,6 +265,9 @@ public static byte[] MultiboxOpen(byte[] cypherText, byte[] secretKey, int maxRe
}

/// <summary>
/// Attempt to decrypt a private-box message, using your secret key.
/// If you where an intended recipient then the plaintext will be returned.
/// If it was not for you, then 'null' will be returned.
/// same as MultiboxOpen
/// </summary>
/// <param name="cypherText"></param>
Expand Down
2 changes: 1 addition & 1 deletion PrivateBox/PrivateBox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>AuditDrivenCrypto</RootNamespace>
<Product>PrivateBox</Product>
<Version>0.3.1.1</Version>
<Version>0.3.1.2</Version>
<Authors>Cinorid (AhmadReza Saghari)</Authors>
<Company>Cinorid</Company>
<Description>C# (.NET Standard) implementation of the NodeJS private-box https://github.com/auditdrivencrypto/private-box</Description>
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.cs → Tests/Test_PrivateBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace AuditDrivenCrypto.Tests
{
public class Tests
public class Test_PrivateBox
{
KeyPair alice;
KeyPair bob;
Expand Down
4 changes: 3 additions & 1 deletion Tests/Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

<IsPackable>false</IsPackable>

<RootNamespace>SSB.Keys.Tests</RootNamespace>
<RootNamespace>AuditDrivenCrypto.Tests</RootNamespace>

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

<StartupObject>AutoGeneratedProgram</StartupObject>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit b1193d1

Please sign in to comment.