// // ICryptography.cs // // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Text; namespace NosSmooth.Cryptography; /// /// An intefrace for NosTale cryptography, encryption, decryption of packets. /// public interface ICryptography { /// /// Decrypt the raw packet (byte array) to a readable list string. /// /// Bytes to decrypt. /// The encoding. /// Decrypted packet to string list. string Decrypt(in ReadOnlySpan str, Encoding encoding); /// /// Encrypt the string packet to byte array. /// /// String to encrypt. /// The encoding. /// Encrypted packet as byte array. byte[] Encrypt(string packet, Encoding encoding); }