Created
October 6, 2022 14:53
-
-
Save mnixry/9657bb1fb4cbb0f73c18076642555371 to your computer and use it in GitHub Desktop.
Encode Novel AI account e-mail & password set into login key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nacl import encoding, hash, pwhash | |
username = b"" # Input your email and password here | |
password = b"" | |
result = pwhash.argon2id.kdf( | |
size=64, | |
password=password, | |
salt=hash.generichash( | |
password[:6] + username + b"novelai_data_access_key", | |
digest_size=pwhash.argon2id.SALTBYTES, | |
encoder=encoding.RawEncoder, | |
), | |
opslimit=2, | |
memlimit=2000000, | |
encoder=encoding.URLSafeBase64Encoder, | |
)[:64] | |
print(result) # Your access key will appear here | |
# You just need to login in API document: https://api.novelai.net/docs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks a lot, mate