Skip to content

Function: encryptPassword() ​

ts
function encryptPassword(
   password, 
   key, 
   options?
): string;

Encrypts a password the way the app does: an RSA-wrapped AES-256-GCM session key over the password, packed as #PWD_INSTAGRAM:4:<ts>:<base64>. The public key comes from the launcher/sync response headers.

Parameters ​

ParameterType
passwordstring
keyPasswordPublicKey
options?EncryptPasswordOptions

Returns ​

string

MIT License. Not affiliated with, endorsed or sponsored by Meta or Instagram.