UseOldPasswordPacket.js 379 B

1234567891011121314
  1. module.exports = UseOldPasswordPacket;
  2. function UseOldPasswordPacket(options) {
  3. options = options || {};
  4. this.firstByte = options.firstByte || 0xfe;
  5. }
  6. UseOldPasswordPacket.prototype.parse = function(parser) {
  7. this.firstByte = parser.parseUnsignedNumber(1);
  8. };
  9. UseOldPasswordPacket.prototype.write = function(writer) {
  10. writer.writeUnsignedNumber(1, this.firstByte);
  11. };