Skip to content

Tried to use signWith(), with algo override, but it ends up error it can't detect the method, as on the docs. #869

Closed Answered by lhazlewood
benyaminl asked this question in Q&A
Discussion options

You must be logged in to vote

The generics signature ensures that the type of key you are providing as the key argument is the type supported by the SecureDigestAlgorithm instance. This prevents using, say, a generic Key with an algorithm that requires a SecretKey, or, for example, using a PublicKey when the algorithm requires a PrivateKey. Hopefully that makes sense!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by benyaminl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants