Summary
DRIVERS-1951 introduces a duplicate method for creating a data key called ClientEncryption.createKey. The rationale for adding createKey is written in the spec:
createDataKey existed before createKey, but createKey was added for parity with the mongosh interface. createDataKey remains for backwards compatibility.
This rationale seems weak at best. It would make more sense for mongosh to add createDataKey to conform with existing driver apis rather than creating a duplicate method in 10+ langauges. Adding createKey will lead to confusing documentation for users.
kenneth.white@mongodb.com also says there's another reason to prefer createDataKey:
the specificity of createDataKey() could be highly desirable down the road when there are potentially other types of keys/key functions that are introduced
Motivation
Who is the affected end user?
Devs.
How does this affect the end user?
They may be confused at having to choose create_key or create_data_key when there doesn't need to be a choice.