Skip to content

WIP: A native implementation of tools to write crypto-based webapps.

License

Notifications You must be signed in to change notification settings

Vexcited/Forgeron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forgeron

A rewrite of the node-forge library in TypeScript with a focus on ESM compatibility with tree-shaking support.

Roadmap

rsa.js

  • forge.pki.privateKeyToAsn1 (alias forge.pki.privateKeyToRSAPrivateKey) : a few type in parameters is missing
  • forge.pki.privateKeyFromAsn1 : setRsaPrivateKey, BigInteger and typings for capture missing

pem.js (DONE)

  • forge.pem.encode
  • forge.pem.decode

pki.js (DONE)

  • forge.pki.pemToDer
  • forge.pki.privateKeyFromPem
  • forge.pki.privateKeyToPem
  • forge.pki.privateKeyInfoToPem

asn1.js

  • forge.asn1.create
  • forge.asn1.copy
  • forge.asn1.equals (some typing issues)
  • forge.asn1.getBerValueLength
  • forge.asn1.fromDer
  • forge.asn1.toDer
  • forge.asn1.oidToDer
  • forge.asn1.derToOid
  • forge.asn1.utcTimeToDate
  • forge.asn1.generalizedTimeToDate
  • forge.asn1.dateToUtcTime
  • forge.asn1.dateToGeneralizedTime
  • forge.asn1.integerToDer
  • forge.asn1.derToInteger
  • forge.asn1.validate
  • forge.asn1.prettyPrint

util.js

  • forge.util.isArray

  • forge.util.isArrayBuffer

  • forge.util.isArrayBufferView

  • forge.util.ByteStringBuffer (forge.util.ByteBuffer is an alias for forge.util.ByteStringBuffer)

    • constructor
    • length
    • isEmpty
    • putByte
    • fillWithByte
    • putBytes
    • putString
    • putInt16
    • putInt24
    • putInt32
    • putInt16Le
    • putInt24Le
    • putInt32Le
    • putInt
    • putSignedInt
    • putBuffer
    • getByte
    • getInt16
    • getInt24
    • getInt32
    • getInt16Le
    • getInt24Le
    • getInt32Le
    • getInt
    • getSignedInt
    • getBytes
    • bytes
    • at
    • setAt
    • last
    • copy
    • compact
    • clear
    • truncate
    • toHex
    • toString
  • forge.util.DataBuffer (experimental though)

    • constructor
    • length
    • isEmpty
    • accommodate
    • putByte
    • fillWithByte
    • putBytes
    • putBuffer
    • putString
    • putInt16
    • putInt24
    • putInt32
    • putInt16Le
    • putInt24Le
    • putInt32Le
    • putInt
    • putSignedInt
    • getByte
    • getInt16
    • getInt24
    • getInt32
    • getInt16Le
    • getInt24Le
    • getInt32Le
    • getInt
    • getSignedInt
    • getBytes
    • bytes
    • at
    • setAt
    • last
    • copy
    • compact
    • clear
    • truncate
    • toHex
    • toString
  • forge.util.fillString

  • forge.util.xorBytes

  • forge.util.hexToBytes

  • forge.util.bytesToHex

  • forge.util.int32ToBytes

  • forge.util.encode64

  • forge.util.decode64

  • forge.util.encodeUtf8

  • forge.util.decodeUtf8

  • forge.util.createBuffer

  • forge.util.binary

    • raw
      • encode
      • decode
    • hex
      • encode (alias for forge.util.bytesToHex)
      • decode
    • base64
      • encode
      • decode
    • base58
      • encode
      • decode
    • baseN (re-export from baseN.js file)
      • encode (baseN.js -> encode)
      • decode (baseN.js -> decode)
  • forge.util.text

    • utf8
      • encode
      • decode
    • utf16
      • encode
      • decode
  • forge.util.deflate

  • forge.util.inflate

  • forge.util.setItem

  • forge.util.getItem

  • forge.util.removeItem

  • forge.util.clearItems

  • forge.util.isEmpty

  • forge.util.format

  • forge.util.formatNumber

  • forge.util.formatSize

  • forge.util.bytesFromIP

  • forge.util.bytesFromIPv4

  • forge.util.bytesFromIPv6

  • forge.util.bytesToIP

  • forge.util.bytesToIPv4

  • forge.util.bytesToIPv6

  • forge.util.estimateCores

License

This project is a fork of the original node-forge project, which was dual-licensed under the BSD 3-Clause License or the GPL 2.0 License.

This hard fork is based on the BSD 3-Clause License version of the original project. As a result, this fork is licensed under the MIT License. You can find the full text of the MIT License in the LICENSE file.