/**
 * Schema used during signing and verification of signature.
 */ export class SignatureScheme { static values : SignatureScheme [ ] = [ ] ; static ECDSAwithSHA224 = new SignatureScheme ( 'SHA224withECDSA' , 0 , 'ES224' ) ; static ECDSAwithSHA256 = new SignatureScheme ( 'SHA256withECDSA' , 1 , 'ES256' ) ; static ECDSAwithSHA384 = new SignatureScheme ( 'SHA384withECDSA' , 2 , 'ES384' ) ; static ECDSAwithSHA512 = new SignatureScheme ( 'SHA512withECDSA' , 3 , 'ES512' ) ; static ECDSAwithSHA3_224 = new SignatureScheme ( 'SHA3-224withECDSA' , 4 , 'ES3-224' ) ; static ECDSAwithSHA3_256 = new SignatureScheme ( 'SHA3-256withECDSA' , 5 , 'ES3-256' ) ; static ECDSAwithSHA3_384 = new SignatureScheme ( 'SHA3-384withECDSA' , 6 , 'ES3-384' ) ; static ECDSAwithSHA3_512 = new SignatureScheme ( 'SHA3-512withECDSA' , 7 , 'ES3-512' ) ; static ECDSAwithRIPEMD160 = new SignatureScheme ( 'RIPEMD160withECDSA' , 8 , 'ER160' ) ; static SM2withSM3 = new SignatureScheme ( 'SM3withSM2' , 9 , 'SM' ) ; static EDDSAwithSHA512 = new SignatureScheme ( 'SHA512withEdDSA' , 10 , 'EDS512' ) ; param hex static fromHex ( hex ) { const item = SignatureScheme . values . find ( ( v ) => v . hex === hex ) ; if ( item === undefined ) { throw new Error ( 'Enum value not found' ) ; } return item ; } param label static fromLabel ( label ) { const item = SignatureScheme . values . find ( ( v ) => v . label === label ) ; if ( item === undefined ) { throw new Error ( 'Enum value not found' ) ; } return item ; } param label static fromLabelJWS ( label ) { const item = SignatureScheme . values . find ( ( v ) => v . labelJWS === label || label . indexOf ( v . labelJWS ) > - 1 ) ; if ( item === undefined ) { throw new Error ( 'Enum value not found' ) ; } return item ; } label : string ; hex : number ; labelJWS : string ; constructor ( label , hex , labelJWS ) { this . label = label ; this . hex = hex ; this . labelJWS = labelJWS ; SignatureScheme . values . push ( this ) ; } }