diff --git a/anbs_cp/Classes/Encrypt/EncriptKey.cs b/anbs_cp/Classes/Encrypt/EncriptKey.cs
index 92b0cda..134c69f 100644
--- a/anbs_cp/Classes/Encrypt/EncriptKey.cs
+++ b/anbs_cp/Classes/Encrypt/EncriptKey.cs
@@ -7,7 +7,7 @@ namespace anbs_cp.Classes.Encrypt;
///
/// Ключ шифровки / расшифровки
///
-public class EncryptKey: IEncryptKey
+public sealed class EncryptKey: IEncryptKey
{
///
/// Конструктор по умолчанию
@@ -18,8 +18,8 @@ public class EncryptKey: IEncryptKey
///
/// Конструктор, принимающий строку и преобразующий в нужный формат
///
- /// Ключ в формате
- public EncryptKey (string key) => Key = Encoding.ASCII.GetBytes(key);
+ /// Ключ в формате и в кодировке utf8
+ public EncryptKey (string utf8Key) => Key = Encoding.UTF8.GetBytes(utf8Key);
///
/// Ключ
@@ -31,18 +31,4 @@ public class EncryptKey: IEncryptKey
///
///
public static EncryptKey GetDefault () => new(Enumerable.Range(0, 32).Select(static x => (byte)x).ToArray());
-
- ///
- /// Получение класса ключа
- ///
- /// Ключ в формате массива
- ///
- public static EncryptKey GetKey (byte[]? key) => key != null ? new(key) : GetDefault();
-
- ///
- /// Получение класса ключа
- ///
- /// Ключ в формате массива
- ///
- public static EncryptKey GetKey (string key) => !string.IsNullOrWhiteSpace(key) ? new(key) : GetDefault();
}
\ No newline at end of file
diff --git a/anbs_cp/anbs_cp.csproj b/anbs_cp/anbs_cp.csproj
index 59766de..ae60b44 100644
--- a/anbs_cp/anbs_cp.csproj
+++ b/anbs_cp/anbs_cp.csproj
@@ -2,7 +2,7 @@
net7.0
- 2023.120.0
+ 2023.121.0
Alexander Babaev
ANB Software Components Pack
Library of some useful functions in C# language.