Key Constructor
@return {Key}
344171
function Key( options ) {

  if( !(this instanceof Key) )
    return new Key( options )

  this.version = null
  this.type = 'rsa-sha256'
  this.flags = null
  this.granularity = null
  this.hash = null
  this.notes = null
  this.service = null
  this.key = null

  var self = this

  if( options != null ) {
    Object.keys( options ).forEach( function( k, v ) {
      if( Key.fields.indexOf( k ) !== -1 ) {
        self[ k ] = options[ k ]
      }
    })
  }

}
1290201
@SuppressWarnings("unchecked")
	public T initKeys() {
		KeyPair keyPair = SecureUtil.generateKeyPair(this.algorithm);
		this.publicKey = keyPair.getPublic();
		this.privateKey = keyPair.getPrivate();
		return (T) this;
	}
1226455
public KeySignature getKey() {
		for (int i = 0, j = size(); i < j; i++) {
			if (elementAt(i) instanceof KeySignature)
				return (KeySignature) elementAt(i);
		}
		return new KeySignature(Note.C, KeySignature.MAJOR);
	}
1114539
function get(key) {
  var k = this.getKey(key);
  var name = this.getName(key);
  var value = this.getValue(k, name, key);
  return value;
}
589391
function () {
			var newObj = {};
			for (var i = 0; i < arguments.length; i++) {
				var obj = arguments[i];
				for (var key in obj) {
					if (obj.hasOwnProperty(key)) {
						newObj[key] = obj[key];
					}
				}
			}
			return newObj;
		}
1341253
function() {
    const ui = assign( {}, this.ui );
    let key;
    let element;

    for ( key in ui ) {
      if ( ui.hasOwnProperty( key ) ) {
        element = this.element.querySelectorAll( ui[key] );
        if ( element.length === 1 ) {
          ui[key] = element[0];
        } else if ( element.length > 1 ) {
          ui[key] = element;
        } else {
          ui[key] = null;
        }
      }
    }
    this.ui = ui;

    return ui;
  }
98334
function keys(obj) {
    var keyList = [];
    for (var key in obj) {
        if (obj.hasOwnProperty(key)) {
            keyList.push(key);
        }
    }
    return keyList;
}
325200
function keyBy (arr, key) {
  var obj = {}
  arr.map(x => obj[x[key]] = x)
  return obj
}
25990
function createAccessors(keys) {
      var fname;
      lodash.forEach(keys, function(key) {

        key.replace(/[^\w\d-]/g, '');

        // get<key>
        fname = createFnName('get', key);
        self[fname] = function() {
          return getKey(ns + key);
        };

        // set<key>
        fname = createFnName('set', key);
        self[fname] = function(value) {
          return setKey(ns + key, value);
        };

        // remove<key>
        fname = createFnName('remove', key);
        self[fname] = function() {
          return removeKey(ns + key);
        };

      });
    }
672935
function(publicKey, callback) {
        request.head(
            this.getResourceUrl({ path: '/keys/' + publicKey, user: null }),
            get404Handler(callback)
        );
        return this;
    }
45163
function objectForKey(object, key, primitives){
  var proto = primitives.getPrototypeOf(object)
  if (!proto || hasOwnProperty(object, key)){
    return object
  } else {
    return objectForKey(proto, key, primitives)
  }
}
292374
function getEncryptionKey (key) {
  key = key || process.env.ENCRYPTION_KEY
  if (!key) throw new Error('encryption key not found')

  const cryptoKey = crypto.createHash('sha256').update(key).digest()
  return cryptoKey
}
395028
function(keyname) {
  const _ = Struct.PriProp(keyname);
  if (_.__proto__) {
    _.__proto__ = Struct.prototype;
  }
  else {
    Object.keys(Struct.prototype).forEach(function(p) {
      Object.defineProperty(_, p, {
        value    : Struct.prototype[p],
        writable : false
      });
    }, this);
  }
  var classFunction;
  Object.defineProperties(_, {
    requires : {
      value: {},
      writable: false
    },

    defaults : {
      value: {},
      writable: false
    },

    defaultFuncs : {
      value: {},
      writable: false
    },

    views: {
      value: {},
      writable: false
    },

    parentProps: {
      value: [],
      writable: false
    },

    enumerableDescs: {
      value: {},
      writable: false
    },

    classFunction : {
      get: function() {
        return classFunction;
      },
      set: function(v) {
        if (classFunction === undefined) {
          classFunction = v;
        }
        else if (classFunction !== v) {
          throw new Error('cannot change classFunction.');
        }
      }
    },

    Modifiers : {
      value    : Struct.Modifiers,
      writable : false
    }
  });
  return _;
}
78464
function () {
            var heap = this.__heap,
                l = heap.length,
                ret;
            if (l) {
                ret = heap[0];
            }
            return ret ? ret.key : ret;
        }
1234989
function getkey(key) {
        var parsedKey = Number(key);

        return (isNaN(parsedKey) || key.indexOf('.') !== -1)? key : parsedKey;
    }
1041451
function(key){
            this._configs = this._configs || {};
            var config = this._configs[key];
            
            if (!config || !this._configs.hasOwnProperty(key)) {
                return null;
            }
            
            return config.getValue();
        }
905650
function Sign(key) {
    var self = this;

    /** default encoding to use in all string operations */
    self.defaultEncoding = undefined;

    if( key instanceof SignKey) {
        self.iKey = key;
    }
    else {
        /** Set of keys used to encrypt and decrypt messages */
        self.iKey = new SignKey();
    }

    /** Size of the generated message signature */
    self.bytes = function() {
        return binding.crypto_sign_BYTES;
    };

    /** String name of the default crypto primitive used in sign operations */
    self.primitive = function() {
        return binding.crypto_sign_PRIMITIVE;
    };

    /**
     * Get the keypair object
     * @returns {SignKey|*}
     */
    self.key = function() {
        return self.iKey;
    };

    /**
     * @return {Number} The size of the message signature
     */
    self.size = function() {
        return binding.crypto_sign_BYTES;
    };

    /**
     * Set the default encoding to use in all string conversions
     * @param {String} encoding  encoding to use
     */
    self.setEncoding = function(encoding) {
        assert(!!encoding.match(/^(?:utf8|ascii|binary|hex|utf16le|ucs2|base64)$/), 'Encoding ' + encoding + ' is currently unsupported.');
        self.defaultEncoding = encoding;
    };

    /**
     * Get the current default encoding
     * @returns {undefined|String}
     */
    self.getEncoding = function() {
        return self.defaultEncoding;
    };

    /**
     * Digitally sign message
     *
     * @param {Buffer|String|Array} message  message to sign
     * @param {String} [encoding]             encoding of message string
     *
     * @returns {Object}                       cipher box
     */
    self.sign = function (message, encoding) {
        encoding = String(encoding) || self.defaultEncoding || 'utf8';

        var buf = toBuffer(message, encoding);

        var signature = binding.crypto_sign(buf, self.iKey.sk().get());
        if( !signature ) {
            return undefined;
        }

        return {
            sign: signature,
            publicKey: self.iKey.pk().get()
        };
    };

    /**
     * Digitally sign message, using detached signature
     *
     * @param {Buffer|String|Array} message  message to sign
     * @param {String} [encoding]            encoding of message string
     *
     * @returns {Object} cipher box
     */
    self.signDetached = function (message, encoding) {
        encoding = String(encoding) || self.defaultEncoding || 'utf8';

        var buf = toBuffer(message, encoding);

        var signature = binding.crypto_sign_detached(buf, self.iKey.sk().get());
        if( !signature ) {
            return undefined;
        }

        return {
            sign: signature,
            publicKey: self.iKey.pk().get()
        };
    };
}