| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Minor point: hanging indents ending on lines 110 and 133 of asymmetric.py have closing paren on lines by themselves. Also, closing braces in lines 34 through 38 of asymmetric_test.py not completely consistent, though all are perfectly clear. Other hanging indents have them at the end of the last line.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| def signAsymmetric(message, client, key_path): | ||
| """Create a signature for a message using a private key stored on Cloud KMS | ||
| """ | ||
| digest_bytes = hashlib.sha256(message.encode('ascii')).digest() |
There was a problem hiding this comment.
This actually varies based on the key algorithm. For EC P-384 keys, it needs to be SHA-384.
Sorry, something went wrong.
There was a problem hiding this comment.
Do you think leaving a comment explaining this above this line would be sufficient?
Sorry, something went wrong.
There was a problem hiding this comment.
Yep!-- or something similar to what you did in the Golang lib, where the sample method was obviously limited to a particular key+digest combo.
Sorry, something went wrong.
| s2 = create_key_helper(t.rsaSignId, t.rsaSign, 'ASYMMETRIC_SIGN', | ||
| 'RSA_SIGN_PSS_2048_SHA256', t) | ||
| s3 = create_key_helper(t.ecSignId, t.ecSign, 'ASYMMETRIC_SIGN', | ||
| 'EC_SIGN_P224_SHA256', t) |
There was a problem hiding this comment.
P224 was dropped from the API
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Added samples for the KMS Asymmetric Keys launch