9fans archive / 1996 / 10 / 51 / prev next
From: Boyd Roberts boyd@fra...
Subject: encrypt/decrypt not thread safe
Date: Thu, 17 Oct 1996 11:07:17 +0200
From: forsyth@pla...
boyd might be able to offer a safe replacement that's not subject
to pointless controls.
you can certainly take my des from ftp://www.plan9.cs.su.oz.au/~boyd/des.msg
but it's not thread safe. it assumes it's being called by a single
threaded program. to fix it you need to have a per thread expanded
key. all you need to do is to change deskey() to accept a parameter
for where to store the expanded key , rather than storing it in a
global static. not real hard.