Skip to content
Snippets Groups Projects
Commit b94f456c authored by Gospodin Bodurov's avatar Gospodin Bodurov
Browse files

Merge branch '90-roundcube-sign-vcard' into 'master'

Add hexStringToUtf8ByteArray

See merge request !91
parents fd80ad2d af2d8e91
No related branches found
No related tags found
1 merge request!91Add hexStringToUtf8ByteArray
......@@ -6,7 +6,8 @@ import {
stringToUtf8Base64,
utf8Base64ToString,
base64ToByteArray,
byteArrayToBase64
byteArrayToBase64,
hexStringToUtf8ByteArray
} from "../utilities/stringUtilities";
import { extractMessageID } from "../helpers/mailparser";
......@@ -1950,6 +1951,11 @@ const connection = Penpal.connectToParent({
result(byteArrayToBase64(ba));
});
},
hexStringToUtf8ByteArray(str) {
return new Penpal.Promise(result => {
result(hexStringToUtf8ByteArray(str));
});
},
// Collabora APIs
collaboraDiscovery() {
......
......@@ -51,3 +51,11 @@ export const byteArrayToBase64 = ba => {
const res = ba.toString("base64");
return res;
};
export const hexStringToUtf8ByteArray = str => {
if (typeof str !== "string") {
str = str.toString();
}
const res = Buffer.from(str, "hex");
return res;
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment