Adding WrapKey to p11/session#95
Conversation
|
This is a drive-by, so feel free to disregard. Wouldn't this be a nicer API if implemented in terms of Admittedly, this only addresses the use-case of wrapping a private key using a public key. I was going to open a separate PR to add a That idea also only addresses the use-case of wrapping with a What do you think? |
|
I agree with @emmanuel |
|
Sounds good! |
| // GenerateRandom returns random bytes generated by the token. | ||
| GenerateRandom(length int) ([]byte, error) | ||
| // Wrap key returns ciphertext bytes from wrapping a key with another key | ||
| WrapKey(request WrapKeyRequest) ([]byte, error) |
There was a problem hiding this comment.
This session interface starts looking like a dumping ground for methods, can you find a better way than adding another method here?
Initial stab at #94