public static byte[] SignMemeData(byte[] input, MemeKeyIndex keyIndex = MemeKeyIndex.PokedexAndSaveFile)
        {
            // Validate Input
            if (input.Length < 0x60)
            {
                throw new ArgumentException("Cannot memesign a buffer less than 0x60 bytes in size!");
            }
            var memekey = new MemeKey(keyIndex);

            if (!memekey.CanResign)
            {
                throw new ArgumentException("Cannot sign with the specified memekey!");
            }

            var output = (byte[])input.Clone();

            // Copy in the SHA1 signature
            using (var sha1 = SHA1.Create())
            {
                Array.Copy(sha1.ComputeHash(input, 0, input.Length - 8), 0, output, output.Length - 8, 8);
            }

            // Perform AES operations
            output = memekey.AesEncrypt(output);
            var sigBuffer = new byte[0x60];

            Array.Copy(output, output.Length - 0x60, sigBuffer, 0, 0x60);
            sigBuffer[0] &= 0x7F;
            sigBuffer     = memekey.RsaPrivate(sigBuffer);
            sigBuffer.CopyTo(output, output.Length - 0x60);
            return(output);
        }