Skip to content

Conversation

@biscoe916
Copy link
Member

No description provided.

}

func (session *HSMSession) DecryptOAEP(key *PrivateKeyRSA, ciphertext []byte, hashFunction crypto.Hash, label []byte) ([]byte, error) {
func (session *HSMSession) DecryptOAEP(key RSAPrivateKey, ciphertext []byte, hashFunction crypto.Hash, label []byte) ([]byte, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove passing in the private key and just leave the function signature as

func (session *HSMSession) DecryptOAEP(hash crypto.Hash, cipherText []byte, label []byte)

The reason I mention this is because on startup when we create an hsm session or standard crypto we are already loading the private key into the struct so internally we have all the information needed for decrypt.

Just some thoughts.

@strantalis
Copy link
Member

resolved by #497

@strantalis strantalis closed this Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants