message: Decrypt with custom private key in getFile.
diff: @@ -330,8 +330,9 @@ function getFileSignedUnencrypted(path: string, opt: GetFileOptions, caller?: Us
  * @ignore
  */
  function handleSignedEncryptedContents(caller: UserSession, path: string, storedContents: string,
  - app: string, username?: string, zoneFileLookupURL?: string) {
  - const appPrivateKey = caller.loadUserData().appPrivateKey
  + app: string, privateKey?: string, username?: string,
  + zoneFileLookupURL?: string) {
  + const appPrivateKey = privateKey || caller.loadUserData().appPrivateKey
  const appPublicKey = getPublicKeyFromPrivate(appPrivateKey)
  let addressPromise: Promise<string>
  @@ -375,6 +376,9 @@ function handleSignedEncryptedContents(caller: UserSession, path: string, stored
  } else if (!verifyECDSA(cipherText, signerPublicKey, signature)) {
  throw new SignatureVerificationError('Contents do not match ECDSA signature in file:'
  + ` ${path}`)
  + } else if (typeof (privateKey) === 'string') {
  + const decryptOpt = { privateKey }
  + return caller.decryptContent(cipherText, decryptOpt)
  } else {
  return caller.decryptContent(cipherText)
  }
  @@ -406,9 +410,10 @@ export interface GetFileUrlOptions {
  export interface GetFileOptions extends GetFileUrlOptions {
  /**
  * Try to decrypt the data with the app private key.
  + * If a string is specified, it is used as the private key.
  * @default true
  */
  - decrypt?: boolean;
  + decrypt?: boolean | string;
  /**
  * Whether the content should be verified, only to be used
  * when [[UserSession.putFile]] was set to `sign = true`.
  @@ -455,13 +460,23 @@ export function getFile(
  if (typeof storedContents !== 'string') {
  throw new Error('Expected to get back a string for the cipherText')
  }
  + if (typeof (opt.decrypt) === 'string') {
  + const decryptOpt = { privateKey: opt.decrypt }
  + return caller.decryptContent(storedContents, decryptOpt)
  + } else {
  return caller.decryptContent(storedContents)
  + }
  } else if (opt.decrypt && opt.verify) {
  if (typeof storedContents !== 'string') {
  throw new Error('Expected to get back a string for the cipherText')
  }
  + let decryptionKey
  + if (typeof (opt.decrypt) === 'string') {
  + decryptionKey = opt.decrypt
  + }
  return handleSignedEncryptedContents(caller, path, storedContents,
  - opt.app, opt.username, opt.zoneFileLookupURL)
  + opt.app, decryptionKey, opt.username,
  + opt.zoneFileLookupURL)
  } else if (!opt.verify && !opt.decrypt) {
  return storedContents
  } else {
  