Example #1
0
        /** 鍵作成。
         */
        public static void CreatePublicKeyPrivateKey(Fee.File.Path a_assets_path, 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);

                    AssetTool.WriteJsonFile(a_assets_path, t_jsonitem);
                }

                //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);

                    AssetTool.WriteJsonFile(a_private_key, t_jsonitem);
                }

                UnityEditor.AssetDatabase.Refresh();
            }
        }