Skip to content

API Design #5

@flytzen

Description

@flytzen

The API should be similar to the following:

public Encryptor Encrypt(string data, Encoding ...);
public Encryptor Encrypt(byte[] data);
public Encryptor Encrypt(ReadOnlySpan<byte> data);
public Encryptor Encrypt(Stream data);

the Encryptor object would then have methods similar to the following:

public string ToBase64String();
public byte ToByteArray();
public Memory<Byte> ToMemory(); ????
public void ToStream(Stream output);

...and similar for decryption.
Should give it a nice, clean API without having to worry about all the conversions and all that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions