<ul dir="auto">
<li>Output of <code class="notranslate">node_modules/.bin/electron --version</code>: <strong>4x / 5x</strong></li>
<li>Operating System (Platform and Version): Windows 10/ Windows 7/ Ubuntu 18.04.1</li>
</ul>
<p dir="auto">aes gcm mode is missing from the list of available ciphers. it works for on my end so is there any reason for this?</p>
<p dir="auto"><strong>To Reproduce</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const crypto = require('crypto');

console.log(crypto.getCiphers())
// returns
[ 'aes-128-cbc','aes-128-ctr','aes-128-ecb','aes-128-ofb','aes-256-cbc',
  'aes-256-ctr','aes-256-ecb','aes-256-ofb','aes-256-xts','des-cbc',
  'des-ecb','des-ede','des-ede-cbc','des-ede3-cbc','rc2-cbc','rc4'
]

// encrypt with gcm
const encGcm = function(text, secret, salt){
  let obj = {},
  iv = crypto.randomBytes(32).toString('hex'),
  key = crypto.pbkdf2Sync(secret, salt, 10000, 32, 'sha512'),
  cipher = crypto.createCipheriv('aes-256-gcm', key, iv),
  encrypted = Buffer.concat([cipher.update(text, 'utf8'), cipher.final()]),
  tag = cipher.getAuthTag();
  obj.iv = iv
  obj.tag = tag.toString('hex');
  obj.encrypted = encrypted.toString('hex');
  return obj;
}

let i = encGcm('text', 'secret', 'salt')

// decrypt with gcm
const decGcm = function(encdata, secret, salt, iv, tag){
  let key = crypto.pbkdf2Sync(secret, salt , 10000, 32, 'sha512'),
  decipher = crypto.createDecipheriv('aes-256-gcm', key, iv);
  decipher.setAuthTag(Buffer.from(tag, 'hex'));
  let decrypted = decipher.update(Buffer.from(encdata, 'hex')) + decipher.final();
  return decrypted;
}

console.log(decGcm(i.encrypted, 'secret', 'salt', i.iv, i.tag))
// returns
text"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">crypto</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'crypto'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">crypto</span><span class="pl-kos">.</span><span class="pl-en">getCiphers</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-c">// returns</span>
<span class="pl-kos">[</span> <span class="pl-s">'aes-128-cbc'</span><span class="pl-kos">,</span><span class="pl-s">'aes-128-ctr'</span><span class="pl-kos">,</span><span class="pl-s">'aes-128-ecb'</span><span class="pl-kos">,</span><span class="pl-s">'aes-128-ofb'</span><span class="pl-kos">,</span><span class="pl-s">'aes-256-cbc'</span><span class="pl-kos">,</span>
  <span class="pl-s">'aes-256-ctr'</span><span class="pl-kos">,</span><span class="pl-s">'aes-256-ecb'</span><span class="pl-kos">,</span><span class="pl-s">'aes-256-ofb'</span><span class="pl-kos">,</span><span class="pl-s">'aes-256-xts'</span><span class="pl-kos">,</span><span class="pl-s">'des-cbc'</span><span class="pl-kos">,</span>
  <span class="pl-s">'des-ecb'</span><span class="pl-kos">,</span><span class="pl-s">'des-ede'</span><span class="pl-kos">,</span><span class="pl-s">'des-ede-cbc'</span><span class="pl-kos">,</span><span class="pl-s">'des-ede3-cbc'</span><span class="pl-kos">,</span><span class="pl-s">'rc2-cbc'</span><span class="pl-kos">,</span><span class="pl-s">'rc4'</span>
<span class="pl-kos">]</span>

<span class="pl-c">// encrypt with gcm</span>
<span class="pl-k">const</span> <span class="pl-en">encGcm</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">text</span><span class="pl-kos">,</span> <span class="pl-s1">secret</span><span class="pl-kos">,</span> <span class="pl-s1">salt</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
  <span class="pl-k">let</span> <span class="pl-s1">obj</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">,</span>
  <span class="pl-s1">iv</span> <span class="pl-c1">=</span> <span class="pl-s1">crypto</span><span class="pl-kos">.</span><span class="pl-en">randomBytes</span><span class="pl-kos">(</span><span class="pl-c1">32</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toString</span><span class="pl-kos">(</span><span class="pl-s">'hex'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
  <span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s1">crypto</span><span class="pl-kos">.</span><span class="pl-en">pbkdf2Sync</span><span class="pl-kos">(</span><span class="pl-s1">secret</span><span class="pl-kos">,</span> <span class="pl-s1">salt</span><span class="pl-kos">,</span> <span class="pl-c1">10000</span><span class="pl-kos">,</span> <span class="pl-c1">32</span><span class="pl-kos">,</span> <span class="pl-s">'sha512'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
  <span class="pl-s1">cipher</span> <span class="pl-c1">=</span> <span class="pl-s1">crypto</span><span class="pl-kos">.</span><span class="pl-en">createCipheriv</span><span class="pl-kos">(</span><span class="pl-s">'aes-256-gcm'</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">iv</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
  <span class="pl-s1">encrypted</span> <span class="pl-c1">=</span> <span class="pl-v">Buffer</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s1">cipher</span><span class="pl-kos">.</span><span class="pl-en">update</span><span class="pl-kos">(</span><span class="pl-s1">text</span><span class="pl-kos">,</span> <span class="pl-s">'utf8'</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">cipher</span><span class="pl-kos">.</span><span class="pl-en">final</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
  <span class="pl-s1">tag</span> <span class="pl-c1">=</span> <span class="pl-s1">cipher</span><span class="pl-kos">.</span><span class="pl-en">getAuthTag</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">iv</span> <span class="pl-c1">=</span> <span class="pl-s1">iv</span>
  <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">tag</span> <span class="pl-c1">=</span> <span class="pl-s1">tag</span><span class="pl-kos">.</span><span class="pl-en">toString</span><span class="pl-kos">(</span><span class="pl-s">'hex'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">encrypted</span> <span class="pl-c1">=</span> <span class="pl-s1">encrypted</span><span class="pl-kos">.</span><span class="pl-en">toString</span><span class="pl-kos">(</span><span class="pl-s">'hex'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-k">return</span> <span class="pl-s1">obj</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">let</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-en">encGcm</span><span class="pl-kos">(</span><span class="pl-s">'text'</span><span class="pl-kos">,</span> <span class="pl-s">'secret'</span><span class="pl-kos">,</span> <span class="pl-s">'salt'</span><span class="pl-kos">)</span>

<span class="pl-c">// decrypt with gcm</span>
<span class="pl-k">const</span> <span class="pl-en">decGcm</span> <span class="pl-c1">=</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">encdata</span><span class="pl-kos">,</span> <span class="pl-s1">secret</span><span class="pl-kos">,</span> <span class="pl-s1">salt</span><span class="pl-kos">,</span> <span class="pl-s1">iv</span><span class="pl-kos">,</span> <span class="pl-s1">tag</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
  <span class="pl-k">let</span> <span class="pl-s1">key</span> <span class="pl-c1">=</span> <span class="pl-s1">crypto</span><span class="pl-kos">.</span><span class="pl-en">pbkdf2Sync</span><span class="pl-kos">(</span><span class="pl-s1">secret</span><span class="pl-kos">,</span> <span class="pl-s1">salt</span> <span class="pl-kos">,</span> <span class="pl-c1">10000</span><span class="pl-kos">,</span> <span class="pl-c1">32</span><span class="pl-kos">,</span> <span class="pl-s">'sha512'</span><span class="pl-kos">)</span><span class="pl-kos">,</span>
  <span class="pl-s1">decipher</span> <span class="pl-c1">=</span> <span class="pl-s1">crypto</span><span class="pl-kos">.</span><span class="pl-en">createDecipheriv</span><span class="pl-kos">(</span><span class="pl-s">'aes-256-gcm'</span><span class="pl-kos">,</span> <span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">iv</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">decipher</span><span class="pl-kos">.</span><span class="pl-en">setAuthTag</span><span class="pl-kos">(</span><span class="pl-v">Buffer</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span><span class="pl-s1">tag</span><span class="pl-kos">,</span> <span class="pl-s">'hex'</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-k">let</span> <span class="pl-s1">decrypted</span> <span class="pl-c1">=</span> <span class="pl-s1">decipher</span><span class="pl-kos">.</span><span class="pl-en">update</span><span class="pl-kos">(</span><span class="pl-v">Buffer</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span><span class="pl-s1">encdata</span><span class="pl-kos">,</span> <span class="pl-s">'hex'</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-s1">decipher</span><span class="pl-kos">.</span><span class="pl-en">final</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-k">return</span> <span class="pl-s1">decrypted</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-en">decGcm</span><span class="pl-kos">(</span><span class="pl-s1">i</span><span class="pl-kos">.</span><span class="pl-c1">encrypted</span><span class="pl-kos">,</span> <span class="pl-s">'secret'</span><span class="pl-kos">,</span> <span class="pl-s">'salt'</span><span class="pl-kos">,</span> <span class="pl-s1">i</span><span class="pl-kos">.</span><span class="pl-c1">iv</span><span class="pl-kos">,</span> <span class="pl-s1">i</span><span class="pl-kos">.</span><span class="pl-c1">tag</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
<span class="pl-c">// returns</span>
<span class="pl-s1">text</span></pre></div>
<h3 dir="auto">code</h3>
<p dir="auto">header.vue:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import { remote, ipcRenderer, clipboard, shell } from 'electron';
let thisWindow = remote.getCurrentWindow();
const thisview = thisWindow.getBrowserView();
export default {
    name: 'header',
    created() {
        console.log(thisWindow, thisWindow.maximizable, thisview);
        this.isMaximizable = thisWindow.maximizable;
    },
}"><pre class="notranslate"><code class="notranslate">import { remote, ipcRenderer, clipboard, shell } from 'electron';
let thisWindow = remote.getCurrentWindow();
const thisview = thisWindow.getBrowserView();
export default {
    name: 'header',
    created() {
        console.log(thisWindow, thisWindow.maximizable, thisview);
        this.isMaximizable = thisWindow.maximizable;
    },
}
</code></pre></div>
<p dir="auto">after I change the frame value to true while create the window , the maximizable will return the right value which is set while created the window</p>
<h3 dir="auto">Issue Details</h3>
<ul dir="auto">
<li><strong>Electron Version:</strong><br>
"electron": "8.2.0",</li>
</ul>