/// <summary> /// Create a key generation parameter. /// </summary> /// /// <param name="keyType">The type for the created key.</param> /// <param name="keyId"></param> /// <exception cref="System.AssertionError">if keyId is empty.</exception> protected internal KeyParams(KeyType keyType, Name.Component keyId) { this.keyId_ = new Name.Component(); if (keyId.getValue().size() == 0) { throw new AssertionError("KeyParams: keyId is empty"); } keyType_ = keyType; keyIdType_ = net.named_data.jndn.security.KeyIdType.USER_SPECIFIED; keyId_ = keyId; }