It's the same b58check(HASH160), but you're hashing a script.
The script for 1-to-1 multisig P2SH addresses is OP_0 hash160(pubkey).
So your address would be b58check(hash160('\x00\x14' + hash160(pubkey))).
Long story short:
1) WIF to pubkey:
secret = b58check_decode(WIF)
pubkey = ECKey(secret).pubkey
2) pubkey to P2PKH (legacy address):
addrtype = 0
addr = b58check(addrtype, hash160(pubkey))
3) pubkey to P2SH (1-to-1 multisig address):
addrtype = 5
addr = b58check(addrtype, hash160('\x00\x14' + hash160(pubkey)))
where hash160(x) = ripemd160(sha256(x))
That's, basically, it. Also see https://github.com/joric/pywallet/issues/1
Regarding 32-byte secret to WIF conversion - bitcoin core doesn't tell apart different WIF's it's just b58check(secret) type 0x80. Importprivkey command generates 3 different addresses - P2PKH, P2SH and BECH32 from the same secret, and you can reexport-reimport the secret anytime.
1-of-1 multisig address. – AMB – 2017-10-15T11:36:48.973
Please update your answer on how to compute the P2SH address (starting with a 3) from
scriptPubKey. – Jus12 – 2017-12-16T16:04:54.310@Jus12 that is not what the question asked. If you have a new question, please ask it separately :) – MeshCollider – 2017-12-16T19:31:58.793