mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2026-03-17 21:58:45 +00:00
Add key update method. Fix getPrimaryUser: evaluation of most significant self signature.
This commit is contained in:
@@ -64,3 +64,17 @@ UserAttribute.prototype.read = function(bytes) {
|
||||
i += len.len;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Compare for equality
|
||||
* @param {module:user_attribute~UserAttribute} usrAttr
|
||||
* @return {Boolean} true if equal
|
||||
*/
|
||||
UserAttribute.prototype.equals = function(usrAttr) {
|
||||
if (!usrAttr || !(usrAttr instanceof UserAttribute)) {
|
||||
return false;
|
||||
}
|
||||
return this.attributes.every(function(attr, index) {
|
||||
return attr === usrAttr.attributes[index];
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user