hex plus plus
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import axios from "axios";
|
||||
import { getStoreKey } from "@/api/lock";
|
||||
import storage from "@/libs/storage";
|
||||
import { md5, wrap,convertBase64ToHexString,convertHexStringToUint8Array} from "@/libs/secret";
|
||||
import { md5, wrap} from "@/libs/secret";
|
||||
import NoteConstant from "@/libs/constants";
|
||||
import { Buffer } from 'buffer';
|
||||
|
||||
axios.interceptors.response.use(undefined, (err) => {
|
||||
const { config: originalRequest } = err;
|
||||
@@ -48,14 +49,7 @@ 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 hexString = convertBase64ToHexString(note.text)
|
||||
let array = convertHexStringToUint8Array(hexString)
|
||||
let array = Buffer.from(note.text, 'base64')
|
||||
|
||||
let blob = new Blob([array], { type: "application/octet-stream" });
|
||||
let form = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user