(LibScheme): added constructors from string key.

This commit is contained in:
morkt 2016-11-24 13:25:22 +04:00
parent 492692773e
commit 0120c3405a

View File

@ -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]