'Using the following hashing method to store a database object
I would like to create a valid variable identifier that can be used across any database object. It seems Oracle has the strictest requirements and only allows 30 chars for a (non-DB) object name, so something like [_a-zA-Z]\W{,29}. My thinking was to base32-encode an md5, such as:
>>> base64.b32encode(hashlib.md5(b'asdf').digest()).rstrip(b'=')
# b'SEXMQA5SZZE6JJKBA2GUSWVVOA'
# len=26
Does that seem like an acceptable approach?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
