Beispiel #1
0
        /** 鍵作成。
         */
        public static void CreatePublicKeyPrivateKey(Fee.File.Path a_public_key, Fee.File.Path a_private_key)
        {
            string t_public_key;
            string t_private_key;

            if (CreateCryptKey(out t_public_key, out t_private_key) == true)
            {
                //public
                {
                    Fee.JsonItem.JsonItem t_jsonitem        = new Fee.JsonItem.JsonItem(new Fee.JsonItem.Value_AssociativeArray());
                    Fee.JsonItem.JsonItem t_jsonitem_public = new Fee.JsonItem.JsonItem(new Fee.JsonItem.Value_StringData(t_public_key));
                    t_jsonitem.SetItem("public", t_jsonitem_public, false);

                    Utility.WriteJsonFile(a_public_key, t_jsonitem, true);
                }

                //private
                {
                    Fee.JsonItem.JsonItem t_jsonitem         = new Fee.JsonItem.JsonItem(new Fee.JsonItem.Value_AssociativeArray());
                    Fee.JsonItem.JsonItem t_jsonitem_private = new Fee.JsonItem.JsonItem(new Fee.JsonItem.Value_StringData(t_private_key));
                    t_jsonitem.SetItem("private", t_jsonitem_private, false);

                    Utility.WriteJsonFile(a_private_key, t_jsonitem, true);
                }

                UnityEditor.AssetDatabase.Refresh();
            }
        }