SecureBlackbox 2020 Node.js Edition

Questions / Feedback?

ChangeProtection Method

Changes the protection level of the secret key.

Syntax

pgpkeymanager.changeProtection(oldPassphrase, newPassphrase, protType, encAlgorithm, hashAlgorithm, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

Use this method to change the protection level of the Key.

OldPassphrase specifies the current password to decrypt the key, NewPassphrase is the new password for the key, ProtType is the new protection type (see for more details), EncAlgorithm is the key encryption algorithm, and

SB_PGP_SYMMETRIC_ALGORITHM_PLAINTEXTPlaintext
SB_PGP_SYMMETRIC_ALGORITHM_IDEAIdea
SB_PGP_SYMMETRIC_ALGORITHM_3DES3DES
SB_PGP_SYMMETRIC_ALGORITHM_CAST5CAST5
SB_PGP_SYMMETRIC_ALGORITHM_BLOWFISHBlowfish
SB_PGP_SYMMETRIC_ALGORITHM_AES128AES128
SB_PGP_SYMMETRIC_ALGORITHM_AES192AES192
SB_PGP_SYMMETRIC_ALGORITHM_AES256AES256
SB_PGP_SYMMETRIC_ALGORITHM_TWOFISH256Twofish256

and HashAlgorithm specify the algorithms to be used for key derivation.

SB_HASH_ALGORITHM_MD5MD5
SB_HASH_ALGORITHM_RIPEMD160RIPEMD160
SB_HASH_ALGORITHM_SHA1SHA1
SB_HASH_ALGORITHM_SHA224SHA224
SB_HASH_ALGORITHM_SHA256SHA256
SB_HASH_ALGORITHM_SHA384SHA384
SB_HASH_ALGORITHM_SHA512SHA512
SB_HASH_ALGORITHM_SHA3_256SHA3_256
SB_HASH_ALGORITHM_SHA3_384SHA3_384
SB_HASH_ALGORITHM_SHA3_512SHA3_512

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Node.js Edition - Version 20.0 [Build 8165]