import { IPrivateKey , IPublicKey , ICrypto , IAccessTokenSigner , Data } from './types' ; export class VirgilAccessTokenSigner implements IAccessTokenSigner { readonly crypto : ICrypto ; constructor ( crypto ) { if ( crypto == null ) { throw new Error ( '`crypto` is required' ) ; } this . crypto = crypto ; } getAlgorithm ( ) { return 'VEDS512' ; } generateTokenSignature ( token , privateKey ) { return this . crypto . calculateSignature ( token , privateKey ) ; } verifyTokenSignature ( token , signature , publicKey ) { return this . crypto . verifySignature ( token , signature , publicKey ) ; } }