From 13605fa72893efaed2ee39f6ae2426a85cfb887c Mon Sep 17 00:00:00 2001 From: Jacob Heun Date: Fri, 7 Aug 2020 17:18:35 +0200 Subject: [PATCH] chore: update documentation --- index.html | 234 ++++++++++++++++++++++++++--------------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/index.html b/index.html index 77f6d4f..3ff5ce0 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - libp2p-crypto 0.17.9 | Documentation + libp2p-crypto 0.18.0 | Documentation @@ -15,7 +15,7 @@

libp2p-crypto

-
0.17.9
+
0.18.0
- id + export @@ -119,9 +119,9 @@
  • - export + id @@ -187,7 +187,7 @@ - + src/keys/index.js @@ -261,7 +261,7 @@ - + src/keys/importer.js @@ -272,7 +272,7 @@ with the given password. The privateKey must have been exported using the same password and underlying cipher (aes-gcm)

    -
    import(privateKey: string, password: string): Promise<Buffer>
    +
    import(privateKey: string, password: string): Promise<Uint8Array>
    @@ -312,8 +312,8 @@ using the same password and underlying cipher (aes-gcm)

    Returns
    - Promise<Buffer>: - The private key protobuf buffer + Promise<Uint8Array>: + The private key protobuf @@ -347,7 +347,7 @@ using the same password and underlying cipher (aes-gcm)

    - + src/ciphers/aes-gcm.js @@ -498,7 +498,7 @@ using the same password and underlying cipher (aes-gcm)

    - + src/ciphers/aes-gcm.js @@ -508,7 +508,7 @@ using the same password and underlying cipher (aes-gcm)

    Uses the provided password to derive a pbkdf2 key. The key will then be used to encrypt the data.

    -
    encrypt(data: Buffer, password: (string | Buffer)): Promise<Buffer>
    +
    encrypt(data: Uint8Array, password: (string | Uint8Array)): Promise<Uint8Array>
    @@ -525,7 +525,7 @@ will then be used to encrypt the data.

    - data (Buffer) + data (Uint8Array) The data to decrypt
    @@ -534,7 +534,7 @@ will then be used to encrypt the data.

    - password ((string | Buffer)) + password ((string | Uint8Array)) A plain password
    @@ -549,7 +549,7 @@ will then be used to encrypt the data.

    Returns
    - Promise<Buffer>: + Promise<Uint8Array>: @@ -584,7 +584,7 @@ will then be used to encrypt the data.

    - + src/ciphers/aes-gcm.js @@ -596,7 +596,7 @@ will then be used to decrypt the data. The options used to create this decryption cipher must be the same as those used to create the encryption cipher.

    -
    decrypt(data: Buffer, password: (string | Buffer))
    +
    decrypt(data: Uint8Array, password: (string | Uint8Array))
    @@ -613,7 +613,7 @@ the encryption cipher.

    - data (Buffer) + data (Uint8Array) The data to decrypt
    @@ -622,7 +622,7 @@ the encryption cipher.

    - password ((string | Buffer)) + password ((string | Uint8Array)) A plain password
    @@ -664,7 +664,7 @@ the encryption cipher.

    - + src/keys/rsa-class.js @@ -729,7 +729,7 @@ of the PKCS SubjectPublicKeyInfo.

    - + src/keys/rsa-class.js @@ -807,7 +807,7 @@ of the PKCS SubjectPublicKeyInfo.

    - + src/keys/rsa.js @@ -841,6 +841,92 @@ of the PKCS SubjectPublicKeyInfo.

    + + + + + + + + + + + + + + +
    + + +
    + +

    + export +

    + + + + src/keys/exporter.js + + +
    + + +

    Exports the given PrivateKey as a base64 encoded string. +The PrivateKey is encrypted via a password derived PBKDF2 key +leveraging the aes-gcm cipher algorithm.

    + +
    export(privateKey: Uint8Array, password: string): Promise<string>
    + + + + + + + + + + + +
    Parameters
    +
    + +
    +
    + privateKey (Uint8Array) + The PrivateKey protobuf + +
    + +
    + +
    +
    + password (string) + +
    + +
    + +
    + + + + + + +
    Returns
    + Promise<string>: + A base64 encoded string + + + + + + + + + @@ -865,7 +951,7 @@ of the PKCS SubjectPublicKeyInfo.

    - + src/keys/ed25519-class.js @@ -930,7 +1016,7 @@ of the PKCS SubjectPublicKeyInfo.

    - + src/keys/ed25519-class.js @@ -939,7 +1025,7 @@ of the PKCS SubjectPublicKeyInfo.

    Exports the key into a password protected format

    -
    export(password: string, format: string): Promise<Buffer>
    +
    export(password: string, format: string): Promise<Uint8Array>
    @@ -981,7 +1067,7 @@ of the PKCS SubjectPublicKeyInfo.

    Returns
    - Promise<Buffer>: + Promise<Uint8Array>: The encrypted private key @@ -1001,92 +1087,6 @@ of the PKCS SubjectPublicKeyInfo.

    -
    - - - - -
    - - -
    - -

    - export -

    - - - - src/keys/exporter.js - - -
    - - -

    Exports the given PrivateKey as a base64 encoded string. -The PrivateKey is encrypted via a password derived PBKDF2 key -leveraging the aes-gcm cipher algorithm.

    - -
    export(privateKey: Buffer, password: string): Promise<string>
    - - - - - - - - - - - -
    Parameters
    -
    - -
    -
    - privateKey (Buffer) - The PrivateKey protobuf buffer - -
    - -
    - -
    -
    - password (string) - -
    - -
    - -
    - - - - - - -
    Returns
    - Promise<string>: - A base64 encoded string - - - - - - - - - - - - - - - - - -
    @@ -1102,7 +1102,7 @@ leveraging the aes-gcm cipher algorithm.

    - + src/keys/secp256k1-class.js @@ -1167,7 +1167,7 @@ of the PKCS SubjectPublicKeyInfo.

    - + src/keys/secp256k1-class.js @@ -1253,7 +1253,7 @@ of the PKCS SubjectPublicKeyInfo.

    - + src/pbkdf2.js