Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add symmetric encryption & tests #112

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add symmetric encryption & tests #112

wants to merge 5 commits into from

Conversation

quadfin
Copy link

@quadfin quadfin commented Nov 14, 2018

Added wrappers for DotNet classes:
System.Security.Cryptography.SymmetricAlgorithm
System.Security.Cryptography.HashAlgorithm
System.Security.Cryptography.ICryptoTransform
System.Security.Cryptography.CryptoStream

Modified existing wrappers:
Codeunit 3000 DotNet_Array
Codeunit 3025 DotNet_StreamWriter
Codeunit 3027 DotNet_StreamReader

Added new codeunit:
Symmetric Encryption Mgt

Added/modified tests for all changes.

@JesperSchulz
Copy link
Contributor

Does this one replace #80 and #81? Or should we process both?

@quadfin
Copy link
Author

quadfin commented Nov 19, 2018

Yes, this one replaces 80,81 -- I just closed those two.

@JesperSchulz
Copy link
Contributor

JesperSchulz commented Nov 19, 2018

Perfect! Thanks! We'll look into it soon! We're currently looking into a larger effort to expose a few, much used, .NET libraries. Encryption is part of that effort and there is hence quite some overlap. We'll keep you posted!

@gunnargestsson
Copy link

Can you make sure that the ClosedXML is a part of that .NET libraries added...

@quadfin
Copy link
Author

quadfin commented Jan 26, 2019

Sorry to bother -- can you provide an update on this request? Thanks.

@gunnargestsson
Copy link

What do you want me to update?

@JesperSchulz
Copy link
Contributor

We’re still on track to include some form of implementation of this in the next major! It will be released as part of our Spring Release. If we have questions, we’ll get back to you.

BaseApp/COD3000.TXT Outdated Show resolved Hide resolved
BaseApp/COD3025.TXT Outdated Show resolved Hide resolved
BaseApp/COD50010.TXT Outdated Show resolved Hide resolved
BaseApp/COD50010.TXT Outdated Show resolved Hide resolved
BaseApp/COD50010.TXT Outdated Show resolved Hide resolved
BaseApp/COD50012.TXT Outdated Show resolved Hide resolved
END;

[External]
PROCEDURE ComputeHashFromText@1000000000(VAR Text@1000000001 : Text;VAR DotNet_Array@1000 : Codeunit 3000);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the intention is to wrap ComputeHash(Byte[]), why don't you pass an array of bytes?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are situations where the data in the calling code will reside in a stream (uploaded file, etc) so this interface makes the calling code simpler (no need to allocate and fill an array). however, your point is valid, there are also situations where the data may reside in an array -- so I have added the "ComputeHash(DotNet_Array, ...)" interface per your comment -- please confirm this is what you expected

BaseApp/COD50014.TXT Show resolved Hide resolved
Test/COD51010.TXT Outdated Show resolved Hide resolved
Test/COD51010.TXT Show resolved Hide resolved
Test/COD51014.TXT Outdated Show resolved Hide resolved
Addded wrappers for CryptoStream properties
Updated interfaces to use enums
Updated tests
BaseApp/COD50010.TXT Outdated Show resolved Hide resolved
BaseApp/COD50015.TXT Outdated Show resolved Hide resolved
BaseApp/COD50016.TXT Outdated Show resolved Hide resolved
BaseApp/COD50017.TXT Outdated Show resolved Hide resolved
Removed unused variables.
Corrected export syntax (accidentally used ExportToNewSyntax in last commit)
@quadfin
Copy link
Author

quadfin commented Apr 15, 2019

Just downloaded / installed the BC Spring update -- was hoping to see this pull or some other symmetric encryption implementation in it but no luck. Are there plans for symmetric encryption support in BC?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants