tweetnacl

  • Version 1.0.3
  • Published
  • 175 kB
  • No dependencies
  • Unlicense license

Install

npm i tweetnacl
yarn add tweetnacl
pnpm add tweetnacl

Overview

Port of TweetNaCl cryptographic library to JavaScript

Index

Variables

variable nacl

var nacl: nacl;

    Interfaces

    interface box

    interface box {}

      property keyPair

      keyPair: boxProps.keyPair;

        property nonceLength

        readonly nonceLength: number;

          property open

          open: boxProps.open;

            property overheadLength

            readonly overheadLength: number;

              property publicKeyLength

              readonly publicKeyLength: number;

                property secretKeyLength

                readonly secretKeyLength: number;

                  property sharedKeyLength

                  readonly sharedKeyLength: number;

                    method after

                    after: (msg: Uint8Array, nonce: Uint8Array, key: Uint8Array) => Uint8Array;

                      method before

                      before: (publicKey: Uint8Array, secretKey: Uint8Array) => Uint8Array;

                        call signature

                        (
                        msg: Uint8Array,
                        nonce: Uint8Array,
                        publicKey: Uint8Array,
                        secretKey: Uint8Array
                        ): Uint8Array;

                          interface BoxKeyPair

                          interface BoxKeyPair {}

                            property publicKey

                            publicKey: Uint8Array;

                              property secretKey

                              secretKey: Uint8Array;

                                interface hash

                                interface hash {}

                                  property hashLength

                                  readonly hashLength: number;

                                    call signature

                                    (msg: Uint8Array): Uint8Array;

                                      interface nacl

                                      interface nacl {}

                                        property box

                                        box: nacl.box;

                                          property hash

                                          hash: nacl.hash;

                                            property scalarMult

                                            scalarMult: nacl.scalarMult;

                                              property secretbox

                                              secretbox: nacl.secretbox;

                                                property sign

                                                sign: nacl.sign;

                                                  method randomBytes

                                                  randomBytes: (n: number) => Uint8Array;

                                                    method setPRNG

                                                    setPRNG: (fn: (x: Uint8Array, n: number) => void) => void;

                                                      method verify

                                                      verify: (x: Uint8Array, y: Uint8Array) => boolean;

                                                        interface scalarMult

                                                        interface scalarMult {}

                                                          property groupElementLength

                                                          readonly groupElementLength: number;

                                                            property scalarLength

                                                            readonly scalarLength: number;

                                                              method base

                                                              base: (n: Uint8Array) => Uint8Array;

                                                                call signature

                                                                (n: Uint8Array, p: Uint8Array): Uint8Array;

                                                                  interface secretbox

                                                                  interface secretbox {}

                                                                    property keyLength

                                                                    readonly keyLength: number;

                                                                      property nonceLength

                                                                      readonly nonceLength: number;

                                                                        property overheadLength

                                                                        readonly overheadLength: number;

                                                                          method open

                                                                          open: (box: Uint8Array, nonce: Uint8Array, key: Uint8Array) => Uint8Array | null;

                                                                            call signature

                                                                            (msg: Uint8Array, nonce: Uint8Array, key: Uint8Array): Uint8Array;

                                                                              interface sign

                                                                              interface sign {}

                                                                                property detached

                                                                                detached: signProps.detached;

                                                                                  property keyPair

                                                                                  keyPair: signProps.keyPair;

                                                                                    property publicKeyLength

                                                                                    readonly publicKeyLength: number;

                                                                                      property secretKeyLength

                                                                                      readonly secretKeyLength: number;

                                                                                        property seedLength

                                                                                        readonly seedLength: number;

                                                                                          property signatureLength

                                                                                          readonly signatureLength: number;

                                                                                            method open

                                                                                            open: (signedMsg: Uint8Array, publicKey: Uint8Array) => Uint8Array | null;

                                                                                              call signature

                                                                                              (msg: Uint8Array, secretKey: Uint8Array): Uint8Array;

                                                                                                interface SignKeyPair

                                                                                                interface SignKeyPair {}

                                                                                                  property publicKey

                                                                                                  publicKey: Uint8Array;

                                                                                                    property secretKey

                                                                                                    secretKey: Uint8Array;

                                                                                                      Namespaces

                                                                                                      namespace boxProps

                                                                                                      namespace boxProps {}

                                                                                                        interface keyPair

                                                                                                        interface keyPair {}

                                                                                                          method fromSecretKey

                                                                                                          fromSecretKey: (secretKey: Uint8Array) => BoxKeyPair;

                                                                                                            call signature

                                                                                                            (): BoxKeyPair;

                                                                                                              interface open

                                                                                                              interface open {}

                                                                                                                method after

                                                                                                                after: (
                                                                                                                box: Uint8Array,
                                                                                                                nonce: Uint8Array,
                                                                                                                key: Uint8Array
                                                                                                                ) => Uint8Array | null;

                                                                                                                  call signature

                                                                                                                  (
                                                                                                                  msg: Uint8Array,
                                                                                                                  nonce: Uint8Array,
                                                                                                                  publicKey: Uint8Array,
                                                                                                                  secretKey: Uint8Array
                                                                                                                  ): Uint8Array | null;

                                                                                                                    namespace signProps

                                                                                                                    namespace signProps {}

                                                                                                                      interface detached

                                                                                                                      interface detached {}

                                                                                                                        method verify

                                                                                                                        verify: (msg: Uint8Array, sig: Uint8Array, publicKey: Uint8Array) => boolean;

                                                                                                                          call signature

                                                                                                                          (msg: Uint8Array, secretKey: Uint8Array): Uint8Array;

                                                                                                                            interface keyPair

                                                                                                                            interface keyPair {}

                                                                                                                              method fromSecretKey

                                                                                                                              fromSecretKey: (secretKey: Uint8Array) => SignKeyPair;

                                                                                                                                method fromSeed

                                                                                                                                fromSeed: (secretKey: Uint8Array) => SignKeyPair;

                                                                                                                                  call signature

                                                                                                                                  (): SignKeyPair;

                                                                                                                                    Package Files (1)

                                                                                                                                    Dependencies (0)

                                                                                                                                    No dependencies.

                                                                                                                                    Dev Dependencies (7)

                                                                                                                                    Peer Dependencies (0)

                                                                                                                                    No peer dependencies.

                                                                                                                                    Badge

                                                                                                                                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/tweetnacl.

                                                                                                                                    • Markdown
                                                                                                                                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/tweetnacl)
                                                                                                                                    • HTML
                                                                                                                                      <a href="https://www.jsdocs.io/package/tweetnacl"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>