0.0.1 • Published 6 years ago

jsaes v0.0.1

Weekly downloads
-
License
GPL-2.0-or-later
Repository
-
Last release
6 years ago

jsaes: AES in JavaScript

jsaes is a compact JavaScript implementation of the AES block cipher. Key lengths of 128, 192 and 256 bits are supported.

Example


The following code example enciphers the plaintext block '00 11 22 .. EE FF' with the 256 bit key '00 01 02 .. 1E 1F'.

AES_Init();

var block = new Array(16);
for(var i = 0; i < 16; i++)
  block[i] = 0x11 * i;

var key = new Array(32);
for(var i = 0; i < 32; i++)
  key[i] = i;

AES_ExpandKey(key);
AES_Encrypt(block, key);

AES_Done();

Usage

import * as AES from 'jsaes';
 <!-- OR -->
import {AES_init,AES_ExpandKey,AES_Encrypt,AES_Done } from 'jsaes';
// User in your projects file.

jsaes is free software, written in 2006 by B. Poettering. The code is licensed under the GNU GPL. The well-functioning of the encryption/decryption routines has been verified for different key lengths with the test vectors given in FIPS-197, Appendix C.

Its not written by me(utkarshp64) I am just making npm package and added export functionality so as to use in newer javascript and typescript frameworks. All functionality and code related rights are reserved with author of this code - "jsaes is free software, written in 2006 by B. Poettering" Please visit (http://point-at-infinity.org/jsaes/) site for more information