lib/format/kdbx-uuid.js
function KdbxUuid(ab) {
    if (ab === undefined) {
        ab = new ArrayBuffer(UuidLength);
    }
    if (typeof ab === 'string') {
        ab = ByteUtils.base64ToBytes(ab);
    }
    this.id = ab.byteLength === 16 ? ByteUtils.bytesToBase64(ab) : undefined;
    this.empty = true;
    if (ab) {
        var bytes = new Uint8Array(ab);
        for (var i = 0, len = bytes.length; i < len; i++) {
            if (bytes[i] !== 0) {
                this.empty = false;
                return;
            }
        }
    }
}
function KdbxUuid(ab) {
    if (ab === undefined) {
        ab = new ArrayBuffer(UuidLength);
    }
    if (typeof ab === 'string') {
        ab = ByteUtils.base64ToBytes(ab);
    }
    this.id = ab.byteLength === 16 ? ByteUtils.bytesToBase64(ab) : undefined;
    this.empty = true;
    if (ab) {
        var bytes = new Uint8Array(ab);
        for (var i = 0, len = bytes.length; i < len; i++) {
            if (bytes[i] !== 0) {
                this.empty = false;
                return;
            }
        }
    }
}
function KdbxUuid ( ab ) { if ( ab === undefined ) { ab = new ArrayBuffer ( UuidLength ) ; } if ( typeof ab === 'string' ) { ab = ByteUtils . base64ToBytes ( ab ) ; } this . id = ab . byteLength === 16 ? ByteUtils . bytesToBase64 ( ab ) : undefined ; this . empty = true ; if ( ab ) { var bytes = new Uint8Array ( ab ) ; for ( var i = 0 , len = bytes . length ; i < len ; i ++ ) { if ( bytes [ i ] !== 0 ) { this . empty = false ; return ; } } } }
Uuid for passwords
@param {ArrayBuffer|string} ab - ArrayBuffer with data
@constructor
Uuid for passwords