module IPCrypt class InvalidIPv4Error < Exception def initialize(ip) super "Invalid IPv4 address: #{ip}" end end class InvalidKeyTypeError < Exception def initialize(key, type) super "Expected key '#{key}' to be a String, got #{type}" end end class InvalidKeyBytesError < Exception def initialize(key, bytes) super "Expected key '#{key}' to be 16-byte, got #{bytes} byte#{bytes == 1 ? '' : ?s}" end end end