createDiffieHellman

external fun createDiffieHellman(primeLength: Number, generator: Number = definedExternally): DiffieHellman(source)

Creates a DiffieHellman key exchange object using the supplied prime and an optional specific generator.

The generator argument can be a number, string, or Buffer. If generator is not specified, the value 2 is used.

If primeEncoding is specified, prime is expected to be a string; otherwise a Buffer, TypedArray, or DataView is expected.

If generatorEncoding is specified, generator is expected to be a string; otherwise a number, Buffer, TypedArray, or DataView is expected.

Since

v0.11.12

Parameters

primeEncoding

The encoding of the prime string.

generator=2

generatorEncoding

The encoding of the generator string.


external fun createDiffieHellman(prime: ArrayBuffer, generator: Double = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBuffer, generator: ArrayBuffer = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBuffer, generator: ArrayBufferView<*> = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBufferView<*>, generator: Double = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBufferView<*>, generator: ArrayBuffer = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBufferView<*>, generator: ArrayBufferView<*> = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBuffer, generator: String, generatorEncoding: BinaryToTextEncoding): DiffieHellman(source)
external fun createDiffieHellman(prime: ArrayBufferView<*>, generator: String, generatorEncoding: BinaryToTextEncoding): DiffieHellman(source)
external fun createDiffieHellman(prime: String, primeEncoding: BinaryToTextEncoding): DiffieHellman(source)
external fun createDiffieHellman(prime: String, primeEncoding: BinaryToTextEncoding, generator: Double = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: String, primeEncoding: BinaryToTextEncoding, generator: ArrayBuffer = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: String, primeEncoding: BinaryToTextEncoding, generator: ArrayBufferView<*> = definedExternally): DiffieHellman(source)
external fun createDiffieHellman(prime: String, primeEncoding: BinaryToTextEncoding, generator: String, generatorEncoding: BinaryToTextEncoding): DiffieHellman(source)