Skip to content

Key Generator

The following are simple encryption key generators I created a while back. Feel free to use them to generate your ADP and AES256 keys.

Keys are not stored

This site does not store the keys it generates. Copy it down — once you leave this page or press the button again, that key is overwritten and the previous one is gone for good.

ADP

An ADP key is 40 bits — ten hexadecimal characters.

press the button
function doGet() {
  return HtmlService.createHtmlOutputFromFile('adpgenerator')
      .setTitle('Random Hexadecimal Generator')
      .setSandboxMode(HtmlService.SandboxMode.IFRAME)
      .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}

function generateRandomHex() {
  var randomHex = generateRandomHexString(10); // 40-bit hex is 10 characters long
  return randomHex;
}

function generateRandomHexString(length) {
  var result = '';
  var characters = '0123456789ABCDEF';
  for (var i = 0; i < length; i++) {
    result += characters.charAt(Math.floor(Math.random() * characters.length));
  }
  return result;
}

AES256

An AES-256 key is 256 bits — sixty-four hexadecimal characters.

press the button
function doGet() {
  return HtmlService.createHtmlOutputFromFile('aesgenerator')
    .setTitle('Random String Generator')
    .setSandboxMode(HtmlService.SandboxMode.IFRAME)
    .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}

function generateRandomHexString64() {
  var randomString = '';
  var characters = '0123456789ABCDEF';
  for (var i = 0; i < 64; i++) {
    randomString += characters.charAt(Math.floor(Math.random() * characters.length));
  }
  return randomString;
}