hex plus
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import axios from "axios";
|
||||
import { getStoreKey } from "@/api/lock";
|
||||
import storage from "@/libs/storage";
|
||||
import { md5, wrap} from "@/libs/secret";
|
||||
import { md5, wrap,convertBase64ToHexString,convertHexStringToUint8Array} from "@/libs/secret";
|
||||
import NoteConstant from "@/libs/constants";
|
||||
|
||||
axios.interceptors.response.use(undefined, (err) => {
|
||||
@@ -51,8 +51,11 @@ export function saveNote(noteForm, secret) {
|
||||
// let bufferArrary = eval("[" + note.text + "]");
|
||||
// let array = Uint8Array.from(bufferArrary);
|
||||
|
||||
let encoder = new TextEncoder()
|
||||
let array = encoder.encode(note.text)
|
||||
// let encoder = new TextEncoder()
|
||||
// let array = encoder.encode(note.text)
|
||||
|
||||
let hexString = convertBase64ToHexString(note.text)
|
||||
let array = convertHexStringToUint8Array(hexString)
|
||||
|
||||
let blob = new Blob([array], { type: "application/octet-stream" });
|
||||
let form = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user