import { queryIsSafe } from '@/webPublic/one_stop_public/utils/queryConfig';
import { uploadFile } from '@/webPublic/one_stop_public/libs/PictureSignature/ShowItem';
import {
  Base16Encode,
  giveBase16EncodeAsync,
} from './SplitBase16Index';
import { giveFilePostData, giveFilePostDataInfoForTrue, requestFileInfo } from './binaryEncode';

export { Base16Encode, requestFileInfo, giveFilePostDataInfoForTrue };

export async function giveBase16EnCode(datas, url) {
  // 全局加解密函数.
  if (queryIsSafe()) {
    return giveFilePostData(datas, url);
  }
  return giveBase16EncodeAsync(datas, url);
}
