From 0120c3405a023308ce5833bd4402f0a406f6781d Mon Sep 17 00:00:00 2001 From: morkt Date: Thu, 24 Nov 2016 13:25:22 +0400 Subject: [PATCH] (LibScheme): added constructors from string key. --- ArcFormats/Malie/ArcLIB.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ArcFormats/Malie/ArcLIB.cs b/ArcFormats/Malie/ArcLIB.cs index 948cdbef..422dab04 100644 --- a/ArcFormats/Malie/ArcLIB.cs +++ b/ArcFormats/Malie/ArcLIB.cs @@ -123,10 +123,8 @@ namespace GameRes.Formats.Malie public uint DataAlign; public uint[] Key; - public LibScheme (uint[] key) + public LibScheme (uint[] key) : this (0x1000, key) { - DataAlign = 0x1000; - Key = key; } public LibScheme (uint align, uint[] key) @@ -134,6 +132,14 @@ namespace GameRes.Formats.Malie DataAlign = align; Key = key; } + + public LibScheme (string key) : this (Camellia.GenerateKey (key)) + { + } + + public LibScheme (uint align, string key) : this (align, Camellia.GenerateKey (key)) + { + } } [Serializable]