mirror of
https://github.com/bitwarden/browser
synced 2025-12-25 12:43:36 +00:00
[EC-598] fix: properly convert credentials to guid raw format
This commit is contained in:
@@ -618,7 +618,11 @@ export class Utils {
|
||||
}
|
||||
|
||||
/** Convert raw 16 byte array to standard format (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX) UUID. */
|
||||
static guidToStandardFormat(arr: Uint8Array) {
|
||||
static guidToStandardFormat(bufferSource: BufferSource) {
|
||||
const arr =
|
||||
bufferSource instanceof ArrayBuffer
|
||||
? new Uint8Array(bufferSource)
|
||||
: new Uint8Array(bufferSource.buffer);
|
||||
// Note: Be careful editing this code! It's been tuned for performance
|
||||
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
||||
const guid = (
|
||||
|
||||
Reference in New Issue
Block a user