PeculiarVentures / webcrypto-core

A input validation layer for WebCrypto polyfills.
MIT License
28 stars 13 forks source link

"Method is not supported" error does not make sense #5

Closed rmhrisk closed 7 years ago

rmhrisk commented 7 years ago

We return "Method is not supported" is not a good error for the case of an unsupported algorithm.

We should return "Unsupported Algorithm : {OID}" in this case.

microshine commented 7 years ago

All Subtle methods return AlgorithmError.UNSUPPORTED_ALGORITHM

public static UNSUPPORTED_ALGORITHM = "Algorithm '%1' is not supported";

Method is not supported is returned from BaseCrypto, which is abstract class for Subtle interface implementations