Работа над ServerStorage
This commit is contained in:
@@ -63,4 +63,8 @@ export async function aesDecrypt(data, password) {
|
||||
key, //from generateKey or importKey above
|
||||
data //ArrayBuffer of the data
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export async function sha256(data) {
|
||||
return await crypto.subtle.digest("SHA-256", Buffer.from(data));
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ export async function copyTextToClipboard(text) {
|
||||
}
|
||||
|
||||
export function toBase58(data) {
|
||||
return bs58.encode(data);
|
||||
return bs58.encode(Buffer.from(data));
|
||||
}
|
||||
|
||||
export function fromBase58(data) {
|
||||
@@ -86,7 +86,7 @@ export function fromBase58(data) {
|
||||
}
|
||||
|
||||
export function toBase64(data) {
|
||||
return bs64.encode(data);
|
||||
return bs64.encode(Buffer.from(data));
|
||||
}
|
||||
|
||||
export function fromBase64(data) {
|
||||
|
||||
Reference in New Issue
Block a user