crypto.js
function assert_length(buf, name, length) {
  if(buf.length !== length)
    throw new Error('expected '+name+' to have length' + length + ', but was:'+buf.length)
}
function assert_length(buf, name, length) {
  if(buf.length !== length)
    throw new Error('expected '+name+' to have length' + length + ', but was:'+buf.length)
}
function assert_length ( buf , name , length ) { if ( buf . length !== length ) throw new Error ( 'expected ' + name + ' to have length' + length + ', but was:' + buf . length ) }
both client and server
both client and server