MCPcopy Create free account
hub / github.com/bitwarden/clients / fromArrayToByteString

Method fromArrayToByteString

libs/common/src/platform/misc/utils.ts:213–223  ·  view source on GitHub ↗

* Converts a Uint8Array to a byte string (each byte as a character). * @param arr - The Uint8Array to convert. * @returns The byte string representation, or null if the input is null.

(arr: Uint8Array | null)

Source from the content-addressed store, hash-verified

211 * @returns The byte string representation, or null if the input is null.
212 */
213 static fromArrayToByteString(arr: Uint8Array | null): string | null {
214 if (arr == null) {
215 return null;
216 }
217
218 let byteString = "";
219 for (let i = 0; i < arr.length; i++) {
220 byteString += String.fromCharCode(arr[i]);
221 }
222 return byteString;
223 }
224
225 static fromArrayToUtf8(arr: Uint8Array): string;
226 static fromArrayToUtf8(arr: null): null;

Callers 8

decryptAes256Method · 0.80
toJSONMethod · 0.80
toByteStringMethod · 0.80
compareConstantTimeFunction · 0.80
utils.spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected