Closed FiloSottile closed 11 years ago
What exactly is the context? Probably the key is unicode and the plaintext is binary (since it's going to be key material from RSA, etc).
The generic TripleSec library encrypt() and decrypt()
I'm wondering if the key can happen to be binary data. Actually if we want TripleSec to be reusable, we should account for this occurrence.
Yeah, I agree. Binary for everything. If you have a utf8-key, it's on you to encode it as binary data first.
:thumbsup:
@maxtaco
Should plaintext and key be binary or Unicode?
Most crypto libraries will leave encoding to the lib user, so only accept binary. However if we only deal with passwords we might want to take care of encoding of the key, but not really sure that it would be a good idea.